Sandy Dalal
Sandy Dalal

Reputation: 21

How to Configure / Enable SSL for HTTPS and steps to create Windows Service?

I have currently deployed a war file in my Jetty 8.x webapps container. I can start the Jetty server and connect to my server using HTTP. I want to be able to connect using HTTPS. What is the easiest way to enable HTTPS on Jetty 8.x? I am willing to use a self-signed certificate if necesssary.

I need the following:

Secondly, is anyone aware of how to turn Jetty 8.x so that it can be run as a Windows service?

For more details, I am running into problems enabling SSL on Jetty. I am trying to use a self signed cert for this purpose. I'm using keytool to create a keypair and self signed cert as follows:

keytool -genkey -alias domain -keyalg RSA -keysize 2048 -validity 365 -keystore keystore

I then copy the keystore to my c:\jetty\etc directory. I edit the file 'jetty-ssl.xml' to make sure that the HTTPS port is set to 8443. When I restart the Jetty server, it seems to be listening on port 8443 and the startup sequence doesn't return any errors. However, when I try to connect using HTTPS, I get errors. Is there a prescribed method for generating a self signed cert and using this cert in the SSL configuration with Jetty?

Upvotes: 2

Views: 11134

Answers (1)

jesse mcconnell
jesse mcconnell

Reputation: 7182

1) http://wiki.eclipse.org/Jetty/Howto/Configure_SSL

2) http://git.codehaus.org/gitweb.cgi?p=jetty-project.git;a=tree;f=jetty-win32;h=e296255dc355f3abf37bf3f4faddfe383505416c;hb=HEAD

You'll need to adapt that for you particular usage, we stopped building it with release quite a while back because its license changed and the version we were using was getting crufty. Alternately take a look at the updated version of the tanuki stuff and if you can handle the license use that.

Upvotes: 0

Related Questions