Subsonic External Sharing Through Custom Domain

Tutorials, tips and tricks.

Moderator: moderators

Re: Subsonic External Sharing Through Custom Domain

Postby tsull360 » Tue Apr 22, 2014 8:58 pm

Windows user here (sorry :))... I've got Subsonic deployed in a similar fashion (tomcat running on Windows, using IIS URL Rewrite to allow external 443 access to my internal Subsonic installation on 4400).

So it looks like you are replacing createShare.jsp with your updated version, rebuilding the war file, and then putting your updated war file in the old files place?

Also, I assume this fix would need to be accomplished for each update of Subsonic (e.g. when 4.10 is released)?

Thanks!
tsull360
 
Posts: 8
Joined: Thu Mar 29, 2012 8:33 pm

Re: Subsonic External Sharing Through Custom Domain

Postby sdct989 » Tue Apr 22, 2014 9:07 pm

It's been a while since I made that patch file. I thought it was two files that I changed, but maybe it's just one file in two places. Just reading the patch file with a text reader should inform you.

Yes, this process has to be completed after each update. And I believe this must recent version breaks the patch file because he changed some of the syntax.

The changes are still the same, I think that the taglibs are just different enough to break the patch. If you have an eye for programming at all you should be fine. But if you can't figure it out, let me know and I'll try to find time to update the patch.

Sent from my Samsung Galaxy S4
User avatar
sdct989
 
Posts: 30
Joined: Thu Jan 31, 2013 4:11 am

Re: Subsonic External Sharing Through Custom Domain

Postby cowieson » Wed Apr 23, 2014 8:09 am

FWIW, I recently updated to 4.9 and re-patched using the patch here as a guideline (as you say sdct989, the syntax is very slightly different in parts of the affected files in the latest version(s) of Subsonic which does break the patch unfortunately). That said, it was fairly straight-forward to replace the relevant segments in the affected files (and yes - it still is 2 files unless there is some difference running Subsonic under Windows that I'm not aware of, but I highly doubt that).
User avatar
cowieson
 
Posts: 8
Joined: Fri Feb 03, 2012 11:57 am

Re: Subsonic External Sharing Through Custom Domain

Postby tsull360 » Wed Apr 23, 2014 6:06 pm

Awesome, working great here. Few notes for other windows folks:

Using sdct989's patch file as a guide, add the lines preceded with a plus, remove the lines with a minus sign.
The url path should be http://host.domain.com, with no quotes or open/closing carets.
As noted, you'll need to fix up your Sharesettings and createShare files anytime you upgrade.

Tim
tsull360
 
Posts: 8
Joined: Thu Mar 29, 2012 8:33 pm

Re: Subsonic External Sharing Through Custom Domain

Postby madhusker » Mon Jul 21, 2014 4:16 am

This is a great thread, thanks!

I wish subsonic sharing is was more configurable through the interface for those of us that are running it on non-standard ports. I have subsonic on my primary NAS and I don't want to risk a hack that exposes my whole NAS by throwing it on the standard port so every subsonic internet bot scanner can hit it. Security through obscurity...
madhusker
 
Posts: 49
Joined: Tue Dec 27, 2011 2:38 am

Re: Subsonic External Sharing Through Custom Domain

Postby guru69 » Sat Jan 24, 2015 7:42 am

This is a great thread! Gave me the starting point to fix my issue, hopefully it helps someone else.
I have had Subsonic since 4.6 and it used to have a field for a custom domain. I was a bit ticked that its been removed now that I updated. I have a real SSL installed and configured and want to leave it all SSL without any 4040 http nonsense, but I still want to use the sharing feature. I am on Ubuntu so I just installed apache and made sure 4040 wasn't in use on Subsonic. I enabled the something.subsonic.org setting in subsonic and forwarded port 4040 to apache in the firewall. In a shell I enabled mod_rewrite:
sudo a2enmod rewrite
(restart apache)
Made a new Virtual apache host file, put in /etc/apache2/sites-available with this:

Listen 4040
<VirtualHost *:4040>
DocumentRoot "/var/www/html"
<Directory "/var/www/html">
AllowOverride All
</Directory>
RewriteEngine on
RedirectMatch ^/share/(.*) https://subsonic.mydomain.com:4443/share/$1
</VirtualHost>

(save, restart apache)
Now shares are correctly redirected to my domain with SSL, no SSL mismatch errors, and no changes needed to Subsonic, life is good.
guru69
 
Posts: 1
Joined: Sat Jan 24, 2015 7:28 am

Previous

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests