Azuracast: Public homepage

Created on 27 Feb 2018  路  18Comments  路  Source: AzuraCast/AzuraCast

  • Installation Method: Docker
  • Host OS (if using Docker): CentOS 7

Hi everyone,

is there a way to make a radio the default public radio ?
Let's say I have radio.com domain.
I want that when a user go to radio.com it shows up the default radio (and not ask the user to login and then redirect him elsewhere).

Long thing short : I want radio.com/public/radio_default to be the homepage of AzuraCast.

Is there a way to do it in Azura ?

Thank's in advance.

enhancement

Most helpful comment

@LazosPlaying Oops, big misunderstanding on my part.

Expect a PR soon. I'm building out a massive project with AzuraCast and plan on adding on a lot of features, that of course I'll share with you all.

All 18 comments

I'm working on it myself then ;)
Will keep this issue updated with the progress.
(I don't know if the issue needs to be edited to be tagged as enhancement and that I'm working on it).

Hey! I just saw your issue while randomly looking at the list 馃槃
A bit late, but hey, whatever, eh? Could still help.

I was asking the same thing here. I'm a bit new to docker, but I'm getting used to it 馃槢

There are a few ways of doing it.

  1. With current installation (docker)
    1.1 You can try to find and reconfigure the nginx's hosts file, add a vitrualhost, point it into another directory and make your custom page there, add the audio source (address provided in the profile page of your station)
    1.2 you can simply use another host (OS), if you have it, running a web server that you can work with (apache2 for me) and create a vitrualhost, point it into a custom directory and make your custom page there, add the audio source (address provided in the profile page of your station)
  2. Custom install
    2.1 You can fully reset your OS (fastest way known to me at the time posting this), install everything the "old way" (not using docker) and reconfigure nginx or apache2 (or whatever else you might happen to be using)

The temporary "solution" I used is 1.2 since I also have a few other VPS servers that I can use.

Hope this helps at least a bit.
Regards.

Hi LazosPlaying ! :)

Thank's for your help ! I was considering to implement this feature in the source code, to let an administrator just check a box that says "Make this radio the homepage of your AzureCast server".

So I'm currently looking into the controller class to modify it, I would rather not touch the nginx configuration ;)

I mean... It's a good idea :)

same here. since i already have my own domain name but can't use it plus i am pretty noob at configuring nginx or apache2.

LazosPlaying at solution number 2 can to explain me into detail if you can?

@kazwashere Well you have some very simple help here
But in addition to that, you need to fully set up your web server with 2 hosts and one proxy (pretty sure) where one virtual host will work as a pannel (probably panel.domain.tld) and then the other one for main public page (root domain.tld).

@LazosPlaying you refering to traditional instalation. so that means aside from azure cast, i must install another web server like apache to set up 2 host and configure nginx for proxy so i can redirect page. my initial case is that one login panel (default address was domain) to switch into public page and the panel got new address redirect ex : ip.adress.com/panel_login

like this?

This is all "as far as I know", there is probably something I am wrong at, so read the official info that should be somewhere.

No. As far as I know, the traditional installation would not be processed using docker, but unzipping files and setting everything up manually.
You would have to setup a web server (be it apache on nginx) and, as far as I know, at least 2 virtualhosts and at least one proxy (for the audio source if you are running over encrypted connection / ssl / https). Before all that you would have to install all web server modules, enable them, configure them, etc.

My opinion

Overall, the easiest way is to have a friend (or yourself) to host you a public page on another server using virtualhosts.

Hey @Nontenda and anybody else who is here facing the challenge of this goal!

Right off the bat, I figured the easiest solution for this would be a no-brainer. Take my web server (in my case, a Linode VPS) and use Nginx to reverse proxy the /public/stationname page of my Azuracast instance on a seperate VPS.

But I ran into a slew of issues. The paths of the CSS/JS/etc dependancies are dynamically inserted into the page without a direct path eg. domain.com/static/js/script.js but instead /static/js/script.js.

So my steps to create a public page using the wonderful public interface created by the contributors here was a more hack-y way. Here's the HTML file:

https://gist.github.com/al-ec/a626f5d3f07a773e662e97fedf3498f0

Make sure to replace 'AZURACAST_WEB_IP' with your IP or domain name of the server or publicly accessable device running Azuracast, eg. https://myradioserver.cc. If you're using HTTPS on either server, then you must use it for both your Azuracast domain/ip and public webpage domain/ip or else your browser will throw a fit. Also, on your public server, create a folder named /fonts and modify the URL to drop Azuracasts's default fonts in there.

Hope this hack solution helps someone out there while I figure out how to code in a much better solution and help contribute to this wonderful project.

Cheers!

@LazosPlaying If you try reverse proxyingA.com/public/stationname to B.com/listen, for example, it will not work due to script/CSS/font/etc. dependancies not being full direct paths. I'm working on a solution now.

Ideally, I'd like to code in a webserver config page that works with the Bootstrap router to setup a custom URL for your public page and an option to replace the / location with it, opting to access the admin panel with /login.

I was not talking about reverse proxying :/

Anyhow, glad to see the second part of the message 馃憤

@LazosPlaying Oops, big misunderstanding on my part.

Expect a PR soon. I'm building out a massive project with AzuraCast and plan on adding on a lot of features, that of course I'll share with you all.

@al-ec I'm definitely interested in hearing more about this. It'll be nice to have some additional contributions to the project. It may be of benefit to set up the usual project management tools for AzuraCast in the event it isn't just a solo project any more. :)

@Nontenda @LazosPlaying @al-ec Hello all, I have an update on this issue!

Since this request has drawn a lot of attention, I wanted to make sure it was implemented in fairly quick order, and I'm happy to say the latest update to the codebase introduces the ability to specify a custom homepage redirection for non-logged-in users visiting your AzuraCast instance.

To do this, the previous homepage (the Dashboard) has been moved to /dashboard, and now the main route, /, checks to see if a custom redirect URL is present (which you can set from the "Custom Branding" page in administration) and redirects unauthenticated users to it, or if one isn't set, sends them to the login page just as before.

This has two effects: if you specify a redirect back to your homepage, your users are far less likely to "stumble upon" the AzuraCast instance and start messing around with it, and it also has the fun side effect of removing the "Error: you must be logged in to access this page" message when initially visiting the page, despite this behavior not being an error at all.

If you're not logged in, you can always reach your AzuraCast instance by going to your-azuracast-site.example.com/login or /dashboard or really any other URL, which will all still work as normal.

@SlvrEagle23 Excellent work, dev. A great implementation and speedy, too.

I鈥檓 building out a PR for a larger array of Liquidsoap config customizations via the UI... but that鈥檚 off topic. I鈥檒l cease work on what you literally just pushed, lol.

Thanks!

@SlvrEagle23 So awesome, thanks Buster! I just setup a new instance (before seeing this issue update) and noticed that text box, and thought, "Now, I swear that wasn't there before..." :) It works perfectly, thanks for the quick turnaround on this!

@mmacy @al-ec Glad to hear you folks find it a useful addition. :)

Alright so, i'm very new to docker - first time using it actually, the way to update to the latest release is just to run the "updater" commands on the home page (here), right ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dpcee30 picture dpcee30  路  3Comments

susl16c picture susl16c  路  3Comments

adamderann picture adamderann  路  4Comments

frozenplaya picture frozenplaya  路  4Comments

ErnestPH picture ErnestPH  路  3Comments