Subsonic reverse proxy issue

General discussions.

Moderator: moderators

Subsonic reverse proxy issue

Postby ajssbp » Sat Apr 02, 2022 2:20 pm

Hello,

I've been a long time subsonic user, over a decade. My workplace recently decided to block any ports other than 80, so I can no longer access my subsonic server at mysite:4040. I've set up a reverse proxy in Apache so mysite/subsonic routes to mysite:4040. The login pages don't work though and I get a 404 error. While testing this at home, if I'm already logged in on another tab and go to mysite/subsonic the page partially loads, but no images and no player. But the data is there. I feel like I'm close, but not quite there.

This is what I have set in my apache .conf file:
Code: Select all
ProxyRequests Off
ProxyPreserveHost On

ProxyPass /subsonic/ http://127.0.0.1:4040/
ProxyPassReverse /subsonic/ http://127.0.0.1:4040/


Any suggestions would be appreciated. Thanks.
ajssbp
 
Posts: 4
Joined: Sun Jun 17, 2012 9:58 pm

Re: Subsonic reverse proxy issue

Postby acroyear » Sat Apr 02, 2022 4:37 pm

Might need to add a Location block? This is mine (minus the lets-encrypt security cert):
Code: Select all
    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / http://localhost:4040/
    ProxyPassReverse / http://localhost:4040/
    <Location />
        Order allow,deny
        Allow from all
    </Location>


Mind you, mine is redirecting based on virtual hosting (a cname setting at my ISP).

Not sure what it would look like without the virtual hosting settings as a wrapper.
--
Joe Shelby
http://subfiresuite.com/
http://subfireplayer.net/
User avatar
acroyear
 
Posts: 755
Joined: Wed Mar 27, 2013 8:05 pm
Location: Northern, VA

Re: Subsonic reverse proxy issue

Postby ajssbp » Sat Apr 02, 2022 5:43 pm

I added the location block, no change in behavior.

Full virtualhost section of the .conf is as follows:

Code: Select all
<VirtualHost *:80>

ProxyRequests Off
ProxyPreserveHost On

ProxyPass /subsonic http://localhost:4040
ProxyPassReverse /subsonic http://localhost:4040

<Location /subsonic>
        Order allow,deny
        Allow from all
</Location>

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

</VirtualHost>


I'm frankly stumped. Seems like this should be working



Edit -

New wrinkle - just for giggles I changed the proxy from /subsonic to just /. That worked perfectly. Subsonic loads, runs, can login, etc. Now the downside obviously is I lose my wordpress site located at the domain usually. Now I'm even more stumped as to what's going on! Proxypass seems to be working right, but something about how I'm trying to do the subsite/folder isn't working right.......
ajssbp
 
Posts: 4
Joined: Sun Jun 17, 2012 9:58 pm

Re: Subsonic reverse proxy issue

Postby acroyear » Sun Apr 03, 2022 2:00 am

try /subsonic/ - maybe the point is having the ending / attached to it, which the / version obviously does?
--
Joe Shelby
http://subfiresuite.com/
http://subfireplayer.net/
User avatar
acroyear
 
Posts: 755
Joined: Wed Mar 27, 2013 8:05 pm
Location: Northern, VA

Re: Subsonic reverse proxy issue

Postby ajssbp » Sun Apr 03, 2022 6:57 pm

Doing /subsonic/ instead of /subsonic results in the same behavior as previous - login page gives a page does not exist error, but if logged in on another tab get partial loading. Flipped it back to / and it works again. This is odd....
ajssbp
 
Posts: 4
Joined: Sun Jun 17, 2012 9:58 pm


Return to General

Who is online

Users browsing this forum: No registered users and 6 guests