How to enable SSL?

Need help? Post your questions here.

Moderator: moderators

How to enable SSL?

Postby reticent » Sun Feb 06, 2011 1:01 pm

Might be a silly question, but how do you enable SSl on subsonic. I'm running the newest version but the option to turn it on is fairly non apparent (Unless I'm blind). I've done a search here and looked on your wiki, can someone help me out?
reticent
 
Posts: 21
Joined: Sun Jan 30, 2011 7:19 pm

Postby supra92 » Sun Feb 06, 2011 6:54 pm

reticent,

I answered your question yesterday underneath dotpyfe's thread "replace SSL cert (Ubuntu)", but I'll paste it in here as well so there's a separate thread for it:


--------------------
The HTTPS setting is in the shell script that starts up Subsonic: subsonic.sh

The 3rd and 4th lines in the main config section are the two to look for, the ones that go:

SUBSONIC_PORT=4040
SUBSONIC_HTTPS_PORT=0

A "0" = disabled. So to enable HTTPS, just change the SUBSONIC_PORT value to 0, and change the SUBSONIC_HTTPS_PORT to whatever you'd like, typically 443 or 8443.

All there is to it, just be sure that whatever port you choose (443, 8443, etc.) is opened up on both the server itself (ie, iptables) and your router (if desiring external access).

Hope this helps, and cheers,
Supra92
User avatar
supra92
 
Posts: 137
Joined: Sun Nov 19, 2006 12:17 am
Location: Central Texas

Postby reticent » Tue Feb 08, 2011 8:17 am

Oh, didn't see that. Thanks, works like a charm :)
reticent
 
Posts: 21
Joined: Sun Jan 30, 2011 7:19 pm

Postby mvo » Wed Feb 09, 2011 12:38 am

Where is the subsonic.sh file located on a default install on Ubuntu? I used the .WAR file to install.

Thanks
mvo
 
Posts: 13
Joined: Wed Dec 08, 2010 3:09 am

Postby oeh » Wed Feb 09, 2011 1:40 am

mvo wrote:Where is the subsonic.sh file located on a default install on Ubuntu? I used the .WAR file to install.

Thanks


Code: Select all
$ /etc/default/


;-)
Regards
OEH ;-}
User avatar
oeh
 
Posts: 89
Joined: Wed Apr 21, 2010 9:26 pm
Location: Oslo Norway

Postby mvo » Wed Feb 09, 2011 2:48 am

Hmm, thanks.

This is what I see:

Code: Select all
#
# This is the configuration file for the Subsonic service
# (/etc/init.d/subsonic)
#
# To change the startup parameters of Subsonic, modify
# the SUBSONIC_ARGS variable below.
#
# Type "subsonic --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Subsonic should use port 7070
# and use a Java memory heap size of 80 MB, use the following:
#
# SUBSONIC_ARGS="--port=7070 --max-memory=80"


I don't see a subsonic.sh file but there is a file called subsonic which the code is posted above. Is this the right file for adding the https port?
mvo
 
Posts: 13
Joined: Wed Dec 08, 2010 3:09 am

Postby stozher » Wed Feb 09, 2011 9:36 pm

/etc/default/subsonic
Code: Select all
# This is the configuration file for the Subsonic service
# (/etc/init.d/subsonic)
#
# To change the startup parameters of Subsonic, modify
# the SUBSONIC_ARGS variable below.
#
# Type "subsonic --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Subsonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 120 MB, use
# the following:
#
# SUBSONIC_ARGS="--port=80 --https-port=443 --max-memory=120"

/usr/share/subsonic/subsonic.sh
Code: Select all
Usage: subsonic.sh [options]
  --help               This small usage guide.
  --home=DIR           The directory where Subsonic will create files.
                       Make sure it is writable. Default: /var/subsonic
  --host=HOST          The host name or IP address on which to bind Subsonic.
                       Only relevant if you have multiple network interfaces and want
                       to make Subsonic available on only one of them. The default value
                       will bind Subsonic to all available network interfaces. Default: 0.0.0.0
  --port=PORT          The port on which Subsonic will listen for
                       incoming HTTP traffic. Default: 4040
  --https-port=PORT    The port on which Subsonic will listen for
                       incoming HTTPS traffic. Default: 0 (disabled)
  --context-path=PATH  The context path, i.e., the last part of the Subsonic
                       URL. Typically '/' or '/subsonic'. Default '/'
  --max-memory=MB      The memory limit (max Java heap size) in megabytes.
                       Default: 100
  --pidfile=PIDFILE    Write PID to this file. Default not created.
  --quiet              Don't print anything to standard out. Default false.
  --default-music-folder=DIR    Configure Subsonic to use this folder for music.  This option
                                only has effect the first time Subsonic is started.
                                Default '/var/music'
  --default-podcast-folder=DIR  Configure Subsonic to use this folder for Podcasts.  This option
                                only has effect the first time Subsonic is started.
                                Default '/var/music/Podcast'
  --default-playlist-folder=DIR Configure Subsonic to use this folder for playlists.  This option
                                only has effect the first time Subsonic is started.
                                Default '/var/playlists'
http://music.stozher.com:8080/login.view?user=guest&password=
User avatar
stozher
 
Posts: 313
Joined: Tue Nov 16, 2010 10:56 am
Location: Sofia, Bulgaria

Postby mvo » Thu Feb 10, 2011 3:42 am

Odd question....what if /usr/share/subsonic/subsonic.sh doesn't exist on my box? I have a /usr/share/subsonic/subsonic.sh.swp file though.
mvo
 
Posts: 13
Joined: Wed Dec 08, 2010 3:09 am

Postby john.jays » Thu Feb 10, 2011 2:57 pm

In Debian / Ubuntu the file is located:

Code: Select all
/etc/default/subsonic


In Red Hat / Fedora the file is located:

Code: Select all
/etc/sysconfig/subsonic


You need to remove the # to enable the option and add the --https-port argument.
# SUBSONIC_ARGS="--port=7070 --https-port=443 --max-memory=80"

It should look at follows and don't forget to restart subsonic or may be better restart your computer.

Code: Select all
#
# This is the configuration file for the Subsonic service
# (/etc/init.d/subsonic)
#
# To change the startup parameters of Subsonic, modify
# the SUBSONIC_ARGS variable below.
#
# Type "subsonic --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Subsonic should use port 7070
# and use a Java memory heap size of 80 MB, use the following:
#
SUBSONIC_ARGS="--port=7070 --https-port=443 --max-memory=80"


This is my config.. I use only SSL:

Code: Select all
SUBSONIC_ARGS="--https-port=443 --max-memory=400"
john.jays
 
Posts: 20
Joined: Wed Feb 02, 2011 1:03 pm

Postby stozher » Thu Feb 10, 2011 3:12 pm

File with extension "war" also found in deb, standalone and war package. What is your installation? What is your server: Jetty, Tomcat or other? What ... ? If you like help post some word about your SS installation... You post only: Ubuntu and WAR... :lol:
http://music.stozher.com:8080/login.view?user=guest&password=
User avatar
stozher
 
Posts: 313
Joined: Tue Nov 16, 2010 10:56 am
Location: Sofia, Bulgaria


Return to Help

Who is online

Users browsing this forum: No registered users and 14 guests