Subsonic behind Apache HTTPS reverse proxy not loading asset

Need help? Post your questions here.

Moderator: moderators

Subsonic behind Apache HTTPS reverse proxy not loading asset

Postby bolino » Tue Jun 30, 2020 8:43 am

I use Apache as HTTPS reverse proxy on my server for several apps.

On HTTP, Subsonic is accessible as usual on http://mydomain.com:4040 (will obfuscate it once HTTPS will work). It is redirect to http://mydomain.com:4040/index.view and works fine for the last 8 years or so.

For HTTPS I recently added this on the Apache HTTPS vhost conf file for my domain, in the <VirtualHost *:443> section:
Code: Select all
ProxyPass           /subsonic       http://127.0.0.1:4040/
ProxyPassReverse    /subsonic       http://127.0.0.1:4040/

I can now access Subsonic on https://mydomain.com/subsonic/, except that the assets are not loaded (no CSS, no images, no JS).
[EDIT]
When I look in the network tab of my browser, I see that all the assets fail to load because they are called on https://mydomain.com/asset.jpg (instead of https://mydomain.com/subsonic/asset.jpg I guess).
Also, https://mydomain.com/subsonic (without the trailing slash) doesn't work.

I have other apps running on my machine with a very similar reverse proxy, and it works fine, so I guess it has something to do with Subsonic config?

Any idea?
bolino
 
Posts: 4
Joined: Fri Sep 07, 2012 2:19 pm

Re: Subsonic behind Apache HTTPS reverse proxy not loading a

Postby bolino » Tue Jun 30, 2020 11:49 am

OK, found a solution. I added "--context-path=/subsonic" to SUBSONIC_ARGS var in subsonic config file in /etc/default/.
I still have a 404 when I don't put a trailing slash in the URL to https://mydomain.com/subsonic, though.
bolino
 
Posts: 4
Joined: Fri Sep 07, 2012 2:19 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 26 guests