Page 1 of 1

nginx reverse proxy issues

PostPosted: Mon May 18, 2015 9:17 am
by thegrantonstarcause
Hi,

I'm trying to access Subsonic via an nginx reverse proxy. The nginx config is:

Code: Select all
        location /subsonic/ {
                proxy_pass http://localhost:4040/;
                rewrite ^/subsonic$ /subsonic/ permanent;
                proxy_redirect off;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;

        }


Everything else for subsonic is the default settings, port 4040 etc.

With this, I can access subsonic but there are many dead image and other links. I am sure I am missing something simple but cant see where or what.

Any help would be appreciated. Thanks!

Re: nginx reverse proxy issues

PostPosted: Tue May 19, 2015 2:45 am
by thegrantonstarcause
Fixed as follows:

/etc/service/subsonic
Code: Select all
SUBSONIC_ARGS="--port=4040 --https-port=0 --context-path=/subsonic --max-memory=150"


nginx config:

Code: Select all
location ^~ /subsonic/ {
                proxy_pass http://localhost:4040/subsonic/;
                proxy_set_header X-Forwarded-Proto https;
                proxy_redirect http:// https://;
                proxy_max_temp_file_size 0;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;


Hopefully this helps someone!

Re: nginx reverse proxy issues

PostPosted: Tue May 19, 2015 5:30 pm
by bry6n
When I attempt to use the same configuration as you on CentOS 7.1, the various views for the subsonic application don't load. Chrome gives me this complaint:

Code: Select all
Refused to display 'https://domain.tld/subsonic/top.view?' in a frame because it set 'X-Frame-Options' to 'DENY'.


Did you receive something similar to this, ever?