3

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:

  • steps to generate and import cert into Jetty (preferably using a self-signed cert)
  • configuration required in Jetty to support HTTPS / SSL
  • command line parameters to start Jetty with SSL enabled

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?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Sandy Dalal
  • 31
  • 1
  • 1
  • 2

1 Answers1

0

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.

jesse mcconnell
  • 7,102
  • 1
  • 22
  • 33