reverse proxy url redirect not working

Madsonic Server 6.x
mad1993max
Posts: 8
Joined: 25 Nov 2013, 23:17
Has thanked: 0
Been thanked: 2 times

reverse proxy url redirect not working

Unread post by 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
Been thanked: 2 times

Re: reverse proxy url redirect not working

Unread post by mad1993max » 09 May 2017, 10:13

anyone? this is really bad, because i can't use the web ui because of this

ripley
Posts: 3
Joined: 28 Nov 2013, 19:08
Has thanked: 0
Been thanked: 2 times

Re: reverse proxy url redirect not working

Unread post by 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/;
        }
}
These users thanked the author ripley for the post:
Madsonic

mad1993max
Posts: 8
Joined: 25 Nov 2013, 23:17
Has thanked: 0
Been thanked: 2 times

Re: reverse proxy url redirect not working

Unread post by 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

Post Reply