Mach5 / supersonic

Open-source web-based media streamer and jukebox fork of Subsonic. Supports MP3, OGG, AAC and other streamable audio and video formats. Runs on Windows, GNU/Linux and Mac using Java.
245 stars 60 forks source link

context path #84

Closed iditude closed 11 years ago

iditude commented 12 years ago

Hello guys,

With subsonic, it is possible to hide it behind an apache2 webserver in a particular folder.

The only requirement is to add a directive to subsonic giving him the right path : SUBSONIC_CONTEXT_PATH=/groovy

See this page for explanation : http://forum.subsonic.org/forum/viewtopic.php?f=6&t=1569

However with supersonic, I've been unable to make it work. Is this implemented?

Thanks a lot

timoreimann commented 12 years ago

Instead of SUBSONIC_CONTEXT_PATH, try SUPERSONIC_CONTEXT_PATH. This should work.

iditude commented 11 years ago

Unfortunately, this is not working either... I can actually check the supersonic_sh.log where is clearly states that the root folder is / through this line :

810 [main] INFO / - Initializing Spring root WebApplicationContext

Any ideas?

timoreimann commented 11 years ago

May be a bug then. I took the variable name from the script and verified that it passes it on directly to the Java application.

I assume you are running Linux? Where did you specify SUPERSONIC_CONTEXT_PATH exactly, at which time/which location?

iditude commented 11 years ago

Indeed, I'm using linux... Ubuntu 12.10 amd64 to be exact...

I've modified the file /etc/default/supersonic

Here's what it looks like now :

#
# This is the configuration file for the Supersonic service
# (/etc/init.d/supersonic)
# 
# To change the startup parameters of Supersonic, modify
# the SUBSONIC_ARGS variable below.
#
# Type "supersonic --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Supersonic 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"

SUBSONIC_ARGS="--max-memory=100"

# The user which should run the Supersonic 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=root
#Added for Apache2
SUPERSONIC_CONTEXT_PATH=/super

Any ideas?

I know the other variables still mention subsonic, but I just started from the default file...

iditude commented 11 years ago

Actually, I've found a solution!

One need to modify the Args line as such...

SUBSONIC_ARGS="--max-memory=100 --context-path=/super"

Be careful not to add a trailing slash, that caused some errors!

Thanks a lot for your answer...

timoreimann commented 11 years ago

Great you figured it out -- I was going to post the same solution.