nginx reverse proxy issues

Need help? Post your questions here.

Moderator: moderators

nginx reverse proxy issues

Postby thegrantonstarcause » Mon May 18, 2015 9:17 am

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!
thegrantonstarcause
 
Posts: 2
Joined: Mon May 18, 2015 9:07 am

Re: nginx reverse proxy issues

Postby thegrantonstarcause » Tue May 19, 2015 2:45 am

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!
thegrantonstarcause
 
Posts: 2
Joined: Mon May 18, 2015 9:07 am

Re: nginx reverse proxy issues

Postby bry6n » Tue May 19, 2015 5:30 pm

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?
bry6n
 
Posts: 1
Joined: Tue May 19, 2015 5:26 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 13 guests