Create a Tomcat self-signed certificate: Difference between revisions
From WickyWiki
Created page with "201110, Ubuntu 11.04 http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html Create a Tomcat self-signed certificate. The key should be stored in a location that is only accessi..." |
No edit summary |
||
| Line 6: | Line 6: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
sudo keytool -genkey -alias tomcat -keyalg RSA -keystore /etc/ssl/private/ | sudo keytool -genkey -alias tomcat -keyalg RSA -keystore /etc/ssl/private/wilbertvolkers.dyndns.org.keystore | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 12: | Line 12: | ||
# enter new keystore password (changeit) | # enter new keystore password (changeit) | ||
# reenter | # reenter | ||
# first and last name ( | # first and last name (wilbertvolkers.dyndns.org) | ||
# departement | # departement | ||
# organisation | # organisation | ||
| Line 32: | Line 32: | ||
port="8443" maxThreads="200" | port="8443" maxThreads="200" | ||
scheme="https" secure="true" SSLEnabled="true" | scheme="https" secure="true" SSLEnabled="true" | ||
keystoreFile="/etc/ssl/private/ | keystoreFile="/etc/ssl/private/wilbertvolkers.dyndns.org.keystore" keystorePass="changeit" | ||
clientAuth="false" sslProtocol="TLS" /> | clientAuth="false" sslProtocol="TLS" /> | ||
... | ... | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 08:54, 21 October 2011
201110, Ubuntu 11.04
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
Create a Tomcat self-signed certificate. The key should be stored in a location that is only accessible with root rights. In this case /etc/ssl/private/ is used.
sudo keytool -genkey -alias tomcat -keyalg RSA -keystore /etc/ssl/private/wilbertvolkers.dyndns.org.keystore
- enter sudo pwd
- enter new keystore password (changeit)
- reenter
- first and last name (wilbertvolkers.dyndns.org)
- departement
- organisation
- city
- province
- countrycode
- key password for tomcat, use "changeit"
Configure Tomcat to use your certificate:
sudo gedit .../tomcat/conf/server.xml
...
<Connector
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="/etc/ssl/private/wilbertvolkers.dyndns.org.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS" />
...