Page 1 of 1

Problem with HTTP relative path after enabling proxy redirec

PostPosted: Sat May 10, 2014 1:31 pm
by nickss
Hi,

I have Subsonic running on Debian on port 4040. But now I want to be able to listen to my music from work, so I have enabled proxy_http for Apache2,
then added the following to my virtual host running on port 80:


<Proxy http://127.0.0.1:8080>
Allow from all
</Proxy>
ProxyPreserveHost on
ProxyPass /subsonic/ http://127.0.0.1:4040/
ProxyPassReverse /subsonic/ http://127.0.0.1:4040/


I then restarted apache2 service and accessed my web page using http://127.0.0.1... Works well so far,
I then tested http://127.0.0.1/subsonic/ and it takes me to the Subsonic page, but a lot of images etc are broken.

I've identified it to be because Subsonic is not looking in the subfolder "subsonic" (http://127.0.0.1/subsonic), but directly under the root still.


Now, where does Subsonic store these settings? I need it to run under /subsonic/ directory.



Thanks!

Re: Problem with HTTP relative path after enabling proxy red

PostPosted: Tue May 13, 2014 9:24 am
by daily-freak
Try switching ProxyPreserveHost to off. This solved my similar problem.

Good Luck!

Re: Problem with HTTP relative path after enabling proxy red

PostPosted: Tue May 13, 2014 12:29 pm
by nickss
Sorry but no difference.

This is a very annoying issue. Are there any other sources where one can get support for Subsonic? This forum is pretty dead.


Thanks.

Re: Problem with HTTP relative path after enabling proxy red

PostPosted: Tue May 13, 2014 1:00 pm
by daily-freak
Yeah, seems like, but I know no other ressource. Maybe Stackoverflow?

But you may look at my config in this thread: viewtopic.php?f=2&t=14370

Maybe you find something helpful.

Greetings.

Re: Problem with HTTP relative path after enabling proxy red

PostPosted: Tue May 13, 2014 1:47 pm
by nickss
OK so I solved it!

Partially thanks to looking at your configuration thread!


What I saw was this particular line in the "subsonic.sh" file:
Code: Select all
SUBSONIC_CONTEXT_PATH=/subsonic


So I did a Google on it and found this thread:
viewtopic.php?f=6&t=1569&start=15

So, what I had to do was:

1. Change SUBSONIC_CONTEXT_PATH to:
Code: Select all
SUBSONIC_CONTEXT_PATH=/subsonic


2. Change my virtual host configuration for Apache2 host to:
Code: Select all
       <Proxy http://127.0.0.1:4040>
                Allow from all
        </Proxy>
        ProxyPreserveHost Off
        ProxyPass /subsonic/ http://127.0.0.1:4040/subsonic/
        ProxyPassReverse /subsonic/ http://127.0.0.1:4040/subsonic/


3. Restart subsonic and Apache



Thank you very much for pointing me in the right direction!