Page 1 of 1

Talking to Subsonic via non-standard port HTTPS

PostPosted: Sun May 23, 2010 11:07 pm
by yacoob
Greetings :)

The configuration I'm aiming at is my home Subsonic instance available over Internet, over HTTPS via non-standard port (different than 443). I've used lighttpd, configured it to listen to SSL requests on port 12345, and proxy requests to subsonic running on localhost:4040.

The login form should be available under https://name:12345. However, from there, I'm redirected to http://name:12345/login.view, which obviously fails, as browser tries to talk plain HTTP to server, that expects HTTPS on port 12345. I can get in after manually changing the scheme to https (that is, visit https://name:12345/login.view). Once I'm in, I can play some music, but part of the links don't work (ie. now playing or settings) - even if their targets have https scheme, they cause the middle iframe to try to load http URL. Which of course doesn't work, and is not easy to fix (because it's an IFRAME :)

Just to make sure it's not related to themes, I've changed back to default theme - but the problem persists. I saw some HTTP/HTTPS related problems described here on the forum, and I got the impression that those have been fixed - but apparently I'm triggering some weird bug. Is Subsonic always forming URLs with the same scheme as provided in request? Or perhaps is it a problem with lighty, that somehow confuses Subsonic about the way it's being accessed by the browser?

I've tested the whole setup with standard HTTP/HTTPS ports, and it worked fine, provided I've configured a redirect from http to https port.

Oh, and if you want to know why I'm doing this: the idea is to move my instance out of the reach of your run-of-the-mill worm scanning for victims on ports 80 and 443. This simple trick reduced the amount of ssh scans in a significant way.

PostPosted: Sun May 23, 2010 11:48 pm
by yacoob
Just for kicks, I've ditched lighttpd, and wrapped Subsonic with stunnel - and I'm getting exactly same behavior, as with mod_proxy. stunnel doesn't know anything about HTTP/HTTPS, so it doesn't change anything in the request and response. Am I correct that it should just work now, and it's Subsonic's problem that some of the URLs are not prefixed in a proper manner?

PostPosted: Mon May 24, 2010 12:13 am
by yacoob
Allright, so from what I can see, this is a known problem:

http://forum.subsonic.org/forum/viewtop ... ight=https
http://forum.subsonic.org/forum/viewtop ... 4&start=30

Here's to hope that Sindre has enjoyed his vacation and will be happy to fix this for us :D