Can I properly use Subsonic (with https) and Apache2

Need help? Post your questions here.

Moderator: moderators

Can I properly use Subsonic (with https) and Apache2

Postby GH0 » Sun Jun 14, 2015 6:43 pm

Right now I am stuck with a bit of a problem:
Shielf.PNG


The dreaded shield.

Subsonic doesn't properly or is leaving some traffic unencrypted. Which leaves me with a subsonic webpage that sometimes doesn't load certain elements or work 100% of the time correctly.

I can easily disable this shield, but I don't want to, I would rather have a fully encrypted connection. Part of the problem with this is that I use apache2 so I can serve all web applications under my domain and certificate on one port, and not open up several ports. Now, is there any way with either ProxyPass or Apache2 itself that this can be done? I know if I try and serve Subsonic using https with proxypass, I just get an error because I am trying to proxy an encrypted connection. But there has to be some way that I can use a fully encrypted service doing this.
GH0
 
Posts: 45
Joined: Sun Dec 18, 2011 6:44 pm

Re: Can I properly use Subsonic (with https) and Apache2

Postby ericvonnine » Tue Jun 16, 2015 2:21 pm

How did you configure Apache?

I followed the guide for reverse proxy and everything is working over https AFAICT.
ericvonnine
 
Posts: 16
Joined: Wed Jan 28, 2015 5:59 pm

Re: Can I properly use Subsonic (with https) and Apache2

Postby GH0 » Fri Jun 26, 2015 3:06 am

ericvonnine wrote:How did you configure Apache?

I followed the guide for reverse proxy and everything is working over https AFAICT.


It works, but you don't receive a message like this in Chrome?

Mixed Content: The page at 'https://omit.org/subsonic/index.view' was loaded over HTTPS, but requested an insecure resource 'http://omit.org/subsonic/home.view;jsessionid=[omit]'. This request has been blocked; the content must be served over HTTPS.

This is my issue.
GH0
 
Posts: 45
Joined: Sun Dec 18, 2011 6:44 pm

Re: Can I properly use Subsonic (with https) and Apache2

Postby ericvonnine » Tue Jun 30, 2015 2:19 pm

I don't normally use chrome, but I installed chromium to test. Neither Firefox nor Chromium complain about my setup. I get the little padlock icon in both cases. Did you follow a guide for setting up the reverse proxy?
ericvonnine
 
Posts: 16
Joined: Wed Jan 28, 2015 5:59 pm

Re: Can I properly use Subsonic (with https) and Apache2

Postby baaldemon » Thu Jul 02, 2015 4:39 pm

The mixed content is from the artist information that is loaded from last.fm as well as possible other external includes. Currently subsonic pulls that data in over http which causes the warning you are seeing.
baaldemon
 
Posts: 99
Joined: Fri May 07, 2010 11:54 am

Re: Can I properly use Subsonic (with https) and Apache2

Postby ericvonnine » Thu Jul 02, 2015 6:23 pm

Is that done client side? Because I am not seeing the mixed content warning.
ericvonnine
 
Posts: 16
Joined: Wed Jan 28, 2015 5:59 pm

Re: Can I properly use Subsonic (with https) and Apache2

Postby sfunk1x » Sun Aug 02, 2015 2:47 am

I also experience this problem. Vanilla Subsonic install of the latest version. Most notably, this will occur on the 'Settings' screen. Until I allow mixed content (Firefox) by clicking the shield and turning the security feature off, I won't see anything. Something is indeed requesting several resources as if the HTTP part of the addressing scheme was actually hard coded somewhere, which I expect the be the case.

For me, I have subsonic listening to 127.0.0.1, and nginx is forwarding requests to subsonic.
sfunk1x
 
Posts: 5
Joined: Wed Aug 29, 2012 6:08 pm

Re: Can I properly use Subsonic (with https) and Apache2

Postby daneren2005 » Sun Aug 02, 2015 3:05 pm

You just have to specify to listen on a HTTPS port instead of http one in the Subsonic config. I believe the default is something like SUBSONIC_HTTP_PORT and it needs to be changed HTTPS. I don't have access to my config right now to say exactly what it is.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Can I properly use Subsonic (with https) and Apache2

Postby daneren2005 » Mon Aug 03, 2015 7:26 pm

As a follow up, here is my config for use with nginx:

Code: Select all
# For example, to specify that Subsonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 200 MB, use
# the following:
#
# SUBSONIC_ARGS="--port=80 --https-port=443 --max-memory=200"

HOST=127.0.0.1
PORT=0
HTTPS_PORT=4040
CONTEXT_PATH=/subsonic

SUBSONIC_ARGS="--max-memory=500 --context-path=${CONTEXT_PATH} --port=${PORT} --https-port=${HTTPS_PORT}"


# The user which should run the Subsonic process. Default "root".
# Note that non-root users are by default not allowed to use ports
# below 1024. Also make sure to grant the user write permissions in
# the music directories, otherwise changing album art and tags will fail.

SUBSONIC_USER=www-data
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 16 guests