I hope this is the right place to report an issue with Tomcat7 (published under Java project). Installation of 12.3 fresh from DVD is straightfoward, download Tomcat7 and extract to /opt, then start the service. It is painless and just work as expected. So I did test on **http://localhost:8080**
, no issue then I move on enabling https by customizing server.xml, then use keytool to generate self-sign certs and restart tomcat7 service.
For your ref, this is the keytool command I used and server.xml config.
keytool -genkeypair -keyalg RSA -alias tomcat -keystore testkey
-validity 999 -keysize 2048
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="200" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/usr/share/tomcat7/webapps/testkey"
keystorePass="testme" />
Looking at catalina.out, here's the error.
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-apr-8443"]
java.lang.Exception: Connector attribute SSLCertificateFile must be defined when using SSL with APR
at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:472)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:498)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:369)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:909)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
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:781)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:573)
at org.apache.catalina.startup.Catalina.load(Catalina.java:596)
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:616)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:449)
Please give me some advice for my situation! Thanks you so much!