Page 1 of 1

Apache/Nginx Reverse Proxy or Rewrite

PostPosted: Fri Dec 04, 2015 9:27 pm
by sabotrax
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

Re: Apache/Nginx Reverse Proxy or Rewrite

PostPosted: Fri Dec 04, 2015 9:49 pm
by frnx
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://;
}