title: How to Configure / Enable SSL for HTTPS and steps to create Windows Service?
body: <p>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. </p>
  
  <p>I need the following:</p>
  
  <ul>
  <li>steps to generate and import cert into Jetty (preferably using a self-signed cert)</li>
  <li>configuration required in Jetty to support HTTPS / SSL</li>
  <li>command line parameters to start Jetty with SSL enabled</li>
  </ul>
  
  <p>Secondly, is anyone aware of how to turn Jetty 8.x so that it can be run as a Windows service?</p>
  
  <p>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:</p>
  
  <pre><code>keytool -genkey -alias domain -keyalg RSA -keysize 2048 -validity 365 -keystore keystore
  </code></pre>
  
  <p>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?</p>