Page 1 of 1

Changing Subsonic folder

PostPosted: Thu Feb 22, 2007 9:25 pm
by Smir9
Hi,

Is there a way of changing the c:\subsonic folder to a custom on?
I have a small boot partition and there's no space in c: for subsonic...



Thanks

PostPosted: Fri Feb 23, 2007 1:24 am
by sindre_mehus
Certainly. If you have installed Tomcat as a Windows service, please proceed as follows:

1. Open "Start > All Programs > Apache Tomcat 5.5 > Configure Tomcat"
2. Select the "Java" tab.
3. Add "-Dsubsonic.home=c:/foo/bar" to "Java Options"
4. Restart Tomcat.

Hope this helps,
Sindre

PostPosted: Fri Feb 23, 2007 8:06 pm
by matthew
Along the same lines - Is it possible to change the name of the web folder so that instead of going to http://localhost/subsonic, I can goto http://localhost/music ?

thanks
Matthew.

PostPosted: Sat Feb 24, 2007 2:25 am
by sindre_mehus
Yes. Just rename subsonic.war to music.war before deploying it. (Remember to remove the old webapps/subsonic directory and war file, otherwise you will have two instances running).

Sindre

PostPosted: Sat Feb 24, 2007 2:33 am
by matthew
sweet. thanks sindre!

Matthew.

PostPosted: Sat Mar 17, 2007 11:43 am
by jman
sindre_mehus wrote:Certainly. If you have installed Tomcat as a Windows service, please proceed as follows:

1. Open "Start > All Programs > Apache Tomcat 5.5 > Configure Tomcat"
2. Select the "Java" tab.
3. Add "-Dsubsonic.home=c:/foo/bar" to "Java Options"
4. Restart Tomcat.

Hope this helps,
Sindre


Hi,

I've installed tomcat as a windows service, but that does not make it available from the start menu. Are you referring to a windows installer?

I've tried several approaches to add a -Dsubsonic.home environment variable through the tomcat admin web interface. Is there a way to to do it there or alternatively manipulate the "Java Options" you refer to directly in the tomcat distribution files?

Another possibility would of course be to install tomcat with a windows installer. However, the distribution I have downloaded does not seem to have an installer.

/Jon

PostPosted: Sat Mar 17, 2007 12:47 pm
by sindre_mehus
Hi Jon,

Tomcat provides three kinds of distributions: zip, tar.gz and "Windows Service Installer".

The latter is the one I'm referring to. And yes, it's a windows installer. If you install the zip or tar.gz version you have to modify the startup scripts in TOMCAT_HOME/bin. There is no way to change it in the admin web interface. The easiest approach is using the windows installer.

Hope this helps,
Sindre

Change subsonic.home

PostPosted: Sat Mar 17, 2007 1:03 pm
by jman
Hi,

Found the answer myself. For all others having trouble with the same issue:

Add the system environment variable:
name: JAVA_OPTS
value: -Dsubsonic.home=x:\foo\bar

PS: Remember to open a new instance of Windows Command Promt to make the new variable "visible"

I think this approach only works if you start the tomcat server using startup.bat (and not if you are running it as a windows service)