Apache/Nginx Reverse Proxy or Rewrite

General discussions.

Moderator: moderators

Apache/Nginx Reverse Proxy or Rewrite

Postby sabotrax » Fri Dec 04, 2015 9:27 pm

Hello,
i'm looking for a working Apache or Nginx configuration to accomplish the following:

https://my.domain.com/music -> http://192.168.1.2:4040

I have a working Apache Reverse Proxy for https://my.domain.com -> http://192.168.1.2:4040
but not with the /music path.

Thanks in advance,
Marcus
sabotrax
 
Posts: 2
Joined: Sat Nov 10, 2012 4:31 pm

Re: Apache/Nginx Reverse Proxy or Rewrite

Postby frnx » Fri Dec 04, 2015 9:49 pm

For nginx, here is mine, it's been working like a charm for months now. Note that you also need to set SUBSONIC_CONTEXT_PATH or use the --context-path option in subsonic.sh for that to work :

Code: Select all
location /subsonic {
      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 https;
      proxy_set_header Host $http_host;
      proxy_max_temp_file_size 0;
      proxy_pass http://localhost:4040;
      proxy_redirect http:// https://;
}
frnx
 
Posts: 44
Joined: Sun May 31, 2015 8:30 pm


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests