title: Not able to configure SSL with Tomcat 7
body: <p>I am trying to configure SSL with Tomcat 7 but not able to do so. Please guide.</p>
  
  <h1>Command for generating SSL certificate:</h1>
  
  <pre><code>C:\Java\jdk1.7.0_40\bin&gt;keytool -genkeypair -alias tomcat-keystore -keyalg RSA -keystore C:\my.keystore
  </code></pre>
  
  <h1>server.xml</h1>
  
  <pre><code>&lt;Connector port="8443" maxThreads="150" scheme="https" secure="true" SSLEnabled="true" 
      keystoreFile="C:\my.keystore" keystorePass="abc" 
      clientAuth="false" keyAlias="tomcat-keystore" sslProtocol="TLS"/&gt;
  </code></pre>
  
  <p>The problem is that if I put <a href="https://wwww.secdevapp.net:8443" rel="nofollow">https://wwww.secdevapp.net:8443</a> the browser says "The webpage is not available" and I see the error in the catalina.log file (mentioned below) but <a href="http://www.secdevapp.net:8080" rel="nofollow">http://www.secdevapp.net:8080</a> works fine.</p>
  
  <h1>Tomcat Error Log:</h1>
  
  <pre><code>Mar 26, 2014 11:22:04 AM org.apache.catalina.core.StandardService initInternal
  SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8443]]
  org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8443]]
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
      at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
      at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
  Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
      at org.apache.catalina.connector.Connector.initInternal(Connector.java:980)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
      ... 12 more
  Caused by: java.lang.Exception: Connector attribute SSLCertificateFile must be defined when using SSL with APR
      at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:467)
      at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
      at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
      at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
      ... 13 more
  </code></pre>