Page 1 of 1

Subsonic / Tomcat / WAMP

PostPosted: Sun Jul 18, 2010 3:03 pm
by cyb3rllama
I am running Subsonic on Windows. I assume Subsonic is using a Tomcat server, but I cannot find any tech docs on exactly where that is running.

I would like to install WAMP on my machine so I can run other web apps, like Gallery, and have a home page that links to Subsonic, Gallery, etc. when I hit my machine externally.

Question: Do I just set up WAMP and run both Apache and Tomcat concurrently or should I try to run Subsonic under Apache? I didn't really want to run two web severs on the same machine if one would do.

Also, I should be able to figure out the sub domain stuff, so that I can hit something like subsonic.myurl.net and gallery.myurl.net.

Anyone else doing this or have any advice?

Thanks!

PostPosted: Mon Jul 19, 2010 9:47 pm
by mgrant
While subsonic CAN run under Tomcat on windows it is normally installed as a standalone JETTY server.

You can install WAMP on the same machine but you will not (easily) be able to use the same port for the Apache web server as you use for Subsonic.

-mg

PostPosted: Wed Jul 21, 2010 2:32 pm
by jeremyh
We have our server setup using tomcat behind Apache and it runs great (have gone months between reboots of the machine). Our Apache has a static redirect of port 80 traffic to the tomcat login page for subsonic. So you hit it with a web browser on 80 and it redirects you to port 8080 where the login page lives.
The only difference is that we are running on an Ubuntu server, so this was easy to setup because we could just load the packages and do minor reconfig to get it running. It shouldn't be that much harder on windows.

That being said, you will have to mess with the configs a little to get it running - but we viewed it as a learning opportunity.

Subsonic and Wamp

PostPosted: Tue Oct 19, 2010 3:46 pm
by flyup
Can you discuss more how you configured tomcat, WAMP and subsonic to work?

It would be a magnificent learning opportunity for me!!!

Thanks!

Config Info

PostPosted: Tue Oct 19, 2010 6:24 pm
by jeremyh
After loading tomcat6 and apache2 packages (and dependencies) via synaptic, we deployed subsonic.war to tomcat (just toss the war into the deploy directory) and fired up tomcat (we start/stop using Boot Up Manager because its GUI, but you can do the same thing at command line). Then we setup a redirect page in apache by editing the /var/www/index.html page:

<html>
<head>
<meta http-equiv="refresh" content="0;url=http://server:8180/subsonic/">
</head>
<body>redirecting...</body>
</html>

Other than that, it is pretty much the default tomcat and apache configs.

We also loaded the default startup script to init.d for tomcat6 so that it is auto-started on boot. So we just hit http://server, which then shows the redirect and then we are at the subsonic login.

You could get a lot fancier with this, but this is fairly clean and simple. Our httpd.conf file is blank since we are always doing the redirect, but you could use apache to do the redirect a little more permanently without the browser redirect. (we are basically having the browser refresh to the new address)

There might be some config that I forgot about doing, but I think that was the important stuff... We downloaded the transcoding libraries we needed (faad, ffmpgeg, flac, lame, etc) and put symlinks into the /var/subsonic/transcode directory to get transcoding working, but those are unrelated to the web setup...

As a note, you could just run tomcat and connect directly to the address, but we liked not having to remember the port (and apache is very stable so we never have to mess with it).

BTW, subsonic upgrades are super simple: 1) Stop tomcat, 2)Drop the new war (delete the temp files created from the last deploy - see war deploy instructions) 3) Start tomcat. The DB and properties are all in /var/subsonic, so you don't have to reconfigure anything.