How to Install Tomcat on Windows and Enable HTTPS / SSL

Tutorials, tips and tricks.

Moderator: moderators

Postby wraithdu » Wed Nov 24, 2010 1:29 am

Also, you might want to include some instructions on how to update JWPlayer to the latest version:

1) Download the JWPlayer archive and extract 'player.swf' to

C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\subsonic\flash\jw-player-5.3.swf

2) Modify the following lines in the following files:

--> C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\subsonic\WEB-INF\jsp\playlist.jsp
-----> swfobject.embedSWF("<c:url value="/flash/jw-player-5.3.swf"/>", "placeholder", "340", "24", "9.0.0", false, flashvars, params, attributes);

--> C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\subsonic\WEB-INF\jsp\videoPlayer.jsp
-----> swfobject.embedSWF("<c:url value="/flash/jw-player-5.3.swf"/>", "placeholder1", "100%", "100%", "9.0.0", false, flashvars, params, attributes);

Where 'jw-player-5.3.swf' is the name of the new player you extracted from the JWPlayer archive in step 1.
wraithdu
 
Posts: 50
Joined: Thu Apr 01, 2010 10:34 pm

Postby seanpkeown » Wed Nov 24, 2010 2:42 am

wraithdu,

I think i found everything. If you see anything else that i need to change feel free to let me know.


Thanks again,
Sean K
seanpkeown
 
Posts: 100
Joined: Tue Jun 09, 2009 10:41 pm

Postby bry1128 » Wed Dec 08, 2010 5:24 pm

I followed your instructions and once I actually typed everything correctly it worked!

Thanks for the guide.

The only thing I could think to add would be double check the firewall and where to find the logs if things go wrong.
bry1128
 
Posts: 4
Joined: Tue Dec 07, 2010 9:30 pm

Postby seanpkeown » Thu Dec 09, 2010 11:59 pm

bry1128 wrote:I followed your instructions and once I actually typed everything correctly it worked!

Thanks for the guide.

The only thing I could think to add would be double check the firewall and where to find the logs if things go wrong.


Hi bry1128,
I'll add a note about looking at the firewall. That's always something that can easily be overlooked. Thanks for letting me know that the tutorial worked.

~ Sean K
seanpkeown
 
Posts: 100
Joined: Tue Jun 09, 2009 10:41 pm

Postby bry1128 » Tue Dec 14, 2010 2:18 pm

I rebooted the server and tomcat didn't start. If I set the service to automatic will that fix it?

I had subsonic installed before. Can I unistall the old install without issue?
bry1128
 
Posts: 4
Joined: Tue Dec 07, 2010 9:30 pm

Postby seanpkeown » Tue Dec 14, 2010 11:57 pm

bry1128 wrote:I rebooted the server and tomcat didn't start. If I set the service to automatic will that fix it?

I had subsonic installed before. Can I unistall the old install without issue?


You should be able to uninstall subsonic without any issues but it's probably a good idea to make a backup of c:\subsonic just in case it gets deleted. It's a small folder so it won't be a big deal.

And yes, make sure that tomcat is set to automatic. I think i checked that when installing tomcat but didn't think to mention that in the tutorial. :wink:

~ Sean K
seanpkeown
 
Posts: 100
Joined: Tue Jun 09, 2009 10:41 pm

Postby bry1128 » Thu Dec 16, 2010 8:27 pm

seanpkeown wrote:

You should be able to uninstall subsonic without any issues but it's probably a good idea to make a backup of c:\subsonic just in case it gets deleted. It's a small folder so it won't be a big deal.


I uninstalled the program, it asks you during the install where the install directory is. It left the new directory of c:\subsonic alone.
bry1128
 
Posts: 4
Joined: Tue Dec 07, 2010 9:30 pm

Postby guitargurus » Mon Dec 20, 2010 3:41 pm

Thank you for the great tutorial, just what I was looking for. I do have one question, if I wanted to buy a signed SSL cert, how would I go about installing it?

Thanks again
guitargurus
 
Posts: 32
Joined: Fri Apr 10, 2009 6:40 pm

Postby seanpkeown » Sun Jan 02, 2011 12:38 am

guitargurus wrote:Thank you for the great tutorial, just what I was looking for. I do have one question, if I wanted to buy a signed SSL cert, how would I go about installing it?

Thanks again


Sorry for the delay, lots to do during the holidays. To be honest i've always created my own because i'm cheap. :D

But here are a couple links that explain what you need and how to install one. I know that you have to first own a domain name and possibly a static ip address for your home and the name.subsonic.org won't work. Then you have to generate a CSR "certificate singing request" from your server then send it off to digicert or verisign and they will send you a key vs you creating one yourself. I think that the price can go anywhere from $12 dollars a year to $249 a year for a certificate all depending on who you buy one from and how much they will cover when you get hacked into.

https://www.sslshopper.com/tomcat-ssl-installation-instructions.html
https://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html


Use this command to create the key.
Code: Select all
keytool -genkey -keyalg RSA -keystore domain.key -alias keyname

Then use this to create the CSR
Code: Select all
keytool -certreq -keyalg RSA -file domain.csr -keystore domain.key -alias keyname


Wish i was more help,
~ Sean K
Last edited by seanpkeown on Sun Jan 02, 2011 6:28 am, edited 1 time in total.
seanpkeown
 
Posts: 100
Joined: Tue Jun 09, 2009 10:41 pm

Postby guitargurus » Sun Jan 02, 2011 12:42 am

Thanks! Actually, I had already figured this one out, just never updated my post. A great place to get a good, cheap cert is namecheap. They resell rapidssl certs for 10/year. Good price and i can confirm they are fully compatible with tomcat. Thanks again for the great info!
guitargurus
 
Posts: 32
Joined: Fri Apr 10, 2009 6:40 pm

Postby ShadowVlican » Tue Jan 11, 2011 3:16 pm

thanks for this guide! now i don't have to suffer with crappy jetty/win2k3 issues anymore!

i don't have a use for SSL (don't need it taking up unnecessary bandwidth and processing power), so i just changed the default tomcat port (8080) to another port and now just streaming unencrypted

don't care if anyone snoops my password, since i use a unique password for subsonic

thanks again!

edit: iSub doesn't seem to work reliably with tomcat... don't know why...
User avatar
ShadowVlican
 
Posts: 26
Joined: Fri Nov 05, 2010 12:49 pm
Location: Canada

Postby seanpkeown » Wed Jan 19, 2011 1:47 am

ShadowVlican wrote:edit: iSub doesn't seem to work reliably with tomcat... don't know why...


Thats horrible news. Whats it do?

~ Sean K
seanpkeown
 
Posts: 100
Joined: Tue Jun 09, 2009 10:41 pm

Re: How to Install Tomcat on Windows and Enable HTTPS / SSL

Postby JanoLapin » Mon Feb 07, 2011 1:25 pm

seanpkeown wrote:Note: I tried running subsonic on tomcat 7.0 but it kept returning with CSRF errors so i installed tomcat 6.0 and subsonic has worked great.
Hi,

Thanks for this tutorial, it works great :)

But i have an question, i tried Tomcat 7, I had CSRF error, i tried to fix it but without success.
Have you a solution for use Tomcat 7 with Subsonic ?
Last edited by JanoLapin on Tue Feb 08, 2011 10:55 pm, edited 1 time in total.
JanoLapin
 
Posts: 11
Joined: Sun Jun 13, 2010 7:54 am

Postby bry1128 » Tue Feb 08, 2011 10:54 pm

I tried upgrading by emptying the contents of c:\program files\apache Software foundation\tomcat 6.0\subsonic and deleting the war however the upgrade didn't happen. I replaced 4.2 and everything came back. Is there some changes to update to 4.4?
bry1128
 
Posts: 4
Joined: Tue Dec 07, 2010 9:30 pm

Postby seanpkeown » Thu Feb 10, 2011 5:59 am

bry1128 wrote:I tried upgrading by emptying the contents of c:\program files\apache Software foundation\tomcat 6.0\subsonic and deleting the war however the upgrade didn't happen. I replaced 4.2 and everything came back. Is there some changes to update to 4.4?


Go to >
Code: Select all
c:\program files\apache Software foundation\tomcat 6.0\webapps


and delete the file called subsonic.war and the folder called subsonic. Then download the new .war file and place it in
Code: Select all
c:\program files\apache Software foundation\tomcat 6.0\webapps


Note: you might need to reboot the tomcat service.

~ Sean K
Last edited by seanpkeown on Thu Feb 10, 2011 6:14 am, edited 1 time in total.
seanpkeown
 
Posts: 100
Joined: Tue Jun 09, 2009 10:41 pm

PreviousNext

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests