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..."
 
m 3 revisions
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
201110, Ubuntu 11.04
[[Category:Ubuntu]]
[[Category:Ubuntu Guide]]
[[Category:201110]]
Ubuntu 11.04


http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
Line 6: Line 9:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
sudo keytool -genkey -alias tomcat -keyalg RSA -keystore /etc/ssl/private/myserver_org.keystore
sudo keytool -genkey -alias tomcat -keyalg RSA -keystore /etc/ssl/private/wilbertvolkers.dyndns.org.keystore
</syntaxhighlight>
</syntaxhighlight>


Line 12: Line 15:
# enter new keystore password (changeit)
# enter new keystore password (changeit)
# reenter
# reenter
# first and last name (myserver.org)
# first and last name (wilbertvolkers.dyndns.org)
# departement
# departement
# organisation
# organisation
Line 32: Line 35:
     port="8443" maxThreads="200"
     port="8443" maxThreads="200"
     scheme="https" secure="true" SSLEnabled="true"
     scheme="https" secure="true" SSLEnabled="true"
     keystoreFile="/etc/ssl/private/myserver.org.keystore" keystorePass="changeit"
     keystoreFile="/etc/ssl/private/wilbertvolkers.dyndns.org.keystore" keystorePass="changeit"
     clientAuth="false" sslProtocol="TLS" />
     clientAuth="false" sslProtocol="TLS" />
   ...
   ...
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 07:21, 5 July 2013

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
  1. enter sudo pwd
  2. enter new keystore password (changeit)
  3. reenter
  4. first and last name (wilbertvolkers.dyndns.org)
  5. departement
  6. organisation
  7. city
  8. province
  9. countrycode
  10. 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" />
  ...