Under a reverse proxy the client will attempt to access the proxied domain rather than the proxy itself when retrieving crossdomain.xml and the video stream itself. This results in a "Video not found or access denied" error.
Example Chrome console output:
(http://i168.photobucket.com/albums/u171 ... bsonic.png)

You can see that the client is attempting to use the name of my upstream block as the domain to reference (without using the upstream block the above simply changes from http://subsonic/subsonic/foo%20bar to http://localhost:4040/subsonic/foo%20bar).
Subsonic is reverse proxied by Nginx with the following relevant configuration
- Code: Select all
upstream subsonic {
server localhost:4040;
}
- Code: Select all
location /subsonic {
proxy_pass http://subsonic;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Subsonic's default config:
- Code: Select all
SUBSONIC_HOST=127.0.0.1
SUBSONIC_PORT=4040
SUBSONIC_CONTEXT_PATH=/subsonic
SUBSONIC_ARGS="--max-memory=5120 --host=${SUBSONIC_HOST} --port=${SUBSONIC_PORT} --context-path=${SUBSONIC_CONTEXT_PATH}"
I've managed a workaround by adding...
- Code: Select all
129.219.26.2 subsonic
...to each client's hosts file so that it can actually resolve the name, but this is unsatisfactory as even a medium term response.
Does anyone know of an Nginx directive for making the player more aware of its position in the proxy? Or point me to where in the code I can set this straight?
Thank you, very much.