So iv gotten quite a few extensions working how i want them including a few front end web gui’s but i would like to setup nginx to redirect port 80 to one front end and port 85 and 87(picked at random) to redirect to other front end extensions.
Right now iv got no issue using mopidy’s http server directly ip-address:6680/extension-name/ works great.
my goal is to eliminate the need for port 6680 and the directory traversal.
i have used iptables to point port 80 at 6680 so i can get that part but the does not help me with the other extensions.
i know you can set a default front end in the http config but that’s not the whole goal.
End game here wqould be
-"ip-address:6680’ would take me to the regular mopidy page where you select a frontend
-“ip-address” defaults to port 80 which goes to the extension 1 front end
-“ip-address:85” goes to extension 2
-“ip-address:87” goes to extension 3
Here is my mopidy config:
[http]
enabled = true
hostname = 0.0.0.0
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
#default_app = mopidy
[audio]
output = alsasink
[spotify]
username = *****************
password = *******************
client_id = ******************
client_secret = **********************
[soundcloud]
auth_token = **************************
[musicbox_webclient]
enabled = true
musicbox = false
websocket_host =
websocket_port =
on_track_click = PLAY_NEXT
and here is my nginx config:
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:6680/party/;
}
}
server {
listen 85;
location / {
proxy_pass http://127.0.0.1:6680/musicbox_webclient/;
}
}
server {
listen 87;
location / {
proxy_pass http://127.0.0.1:6680/mobile/;
}
}
these configs get me to the extensions but then there is no connection to mopidy after. like when i use the musicbox client it just says “trying to reach to mopidy at 127.0.0.1. Please wait” and the other extensions are completely unresponsive they load the web page but you cant interact with anything.