-
-
Notifications
You must be signed in to change notification settings - Fork 7
App does not work correctly when music-assistant is behind reverse proxy #85
Description
First of all thank you for the app. You do a great job.
I have music-assistant running in a docker container and accessing it with the app via the local IP address (say 192.168.0.10, the port is found automatically: 8095) works (apart from it saying "Music Assistant login failed. Please check your credentials.", but when I then restart the app I am logged in anyway).
Now when I try to access music-assistant with app over an URL (http://music-assistant.lan) that my reverse proxy server forwards to the same IP address as before (192.168.0.10:8095), the app says:
"Connection failed: Socket Exception: Connection refused (OS Error: Connection refused, errno = 111), address = music-assistant.lan, port = 24954"
When I specify the port (http://music-assistant.lan:80) then login works as with the local IP, however pictures do not load and I cannot play audio on the phone as it does not show up as playback device. So there is clearly something not quite right.
There is a real chance that my reverse proxy setup is not sufficient is some way. Still, the music-assistant's web interface worked fine.
I use nginx proxy manager and have the following setup:
- domain: music-assistant.lan
- forward IP address: 192.168.0.10
- forward port: 8095
- websocket support: enabled
In the custom nginx configuration i have both added and removed the following three blocks:
proxy_read_timeout 3600;
proxy_send_timeout 3600;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
location / {
proxy_pass http://192.168.178.12:8095;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
# Websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
The logs I encountered when logging in with http://music-assistant.lan:80 are found below:
log.txt