Reputation: 13
I'm trying to secure my Tomcat 7 Server with SSL. It's runnin on Ubuntu 11.
So first I created a keystore with this command:
keytool -genkey -alias tomcat -keyalg RSA
as password I took 'changeit'
This is my Connector in the server.xml:
<Connector port="8443" maxThreads="200" scheme="https" secure="true" SSLEnabled="true"
keystoreFile="${user.home}/.keystore" keystorePass="changeit" clientAuth="false" sslProtocol="TLS" />
so if I try to connect to https//:localhost:8443, I got an error that it's unable to connect.
I have no idea what I have to do. :(
Please help me! Thx :)
Upvotes: 1
Views: 2540
Reputation: 54094
Add the following attribute to your connector:
protocol="org.apache.coyote.http11.Http11Protocol"
I.e.
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
port="8443" .../>
This is absolutely required.
Assuming that there is no problem with the keystore this should work.
You could use a java based tool to create your keystore you know e.g. Certificate Helper
Upvotes: 3