reverse proxy url redirect not working

Madsonic Server 6.x

reverse proxy url redirect not working

Unread postby mad1993max » 06 May 2017, 21:57

I cant get madsonic to stop redirecting me to the ip address of the madsonic instance if i use a reverse proxy. I specified my domain name in Netowrk settings but it doesnt work.

If i type the url for the reverse proxy i get to the madsonic instance, but it redirects me to the ip of the madsonic:
name.domain.com --> (madonic) --> 192.168.0.122:4040

but the IP address is only accessible from the local network, so it makes no sense for the masonic server to rewrite the URL to the IP
Last edited by mad1993max on 09 May 2017, 10:15, edited 2 times in total.
mad1993max
 
Posts: 8
Joined: 25 Nov 2013, 23:17
Has thanked: 0 time
Been thanked: 2 times

Re: reverse proxy url redirect not working

Unread postby mad1993max » 09 May 2017, 10:13

anyone? this is really bad, because i can't use the web ui because of this
mad1993max
 
Posts: 8
Joined: 25 Nov 2013, 23:17
Has thanked: 0 time
Been thanked: 2 times

Re: reverse proxy url redirect not working

Unread postby ripley » 19 May 2017, 07:33

I had the same issue. Below is my MadSonic config snippet from nginx. I had to add the proxy_redirect bit to make it work correctly.

Code: Select all
server {
        listen 443 ssl;
        listen [::]:443 ssl;
        server_name music.mydomain.org;
        include snippets/ssl-mydomain.org.conf;
        ssl_dhparam /etc/ssl/certs/dhparam.pem;
        location / {
                proxy_pass http://madsonic.localdomain.local:4040;
                proxy_redirect https://madsonic.localdomain.local:4040/ https://music.mydomain.org/;
        }
}
ripley
 
Posts: 3
Joined: 28 Nov 2013, 19:08
Has thanked: 0 time
Been thanked: 2 times

Re: reverse proxy url redirect not working

Unread postby mad1993max » 20 May 2017, 14:10

that is not an option for me, beacause i use a reverse proxy built into my firewall, where i cant edit the proxy parameters.

there mus be an option for madsonic to not rewrite the url to the localhost ip
mad1993max
 
Posts: 8
Joined: 25 Nov 2013, 23:17
Has thanked: 0 time
Been thanked: 2 times


Return to Server 6.x

Who is online

Users browsing this forum: No registered users and 0 guests