In this tutorial we explain how you can access your Apache Tomcat via a SSL (HTTPS) connection. 1. Prerequisites Install Apache Tomcat as explained here Install Apache Tomcat on Windows JDK is installed correctly 2. Generate self-signed certificate First we have to generate a self-signed certificate and encryption key to secure our connection. In command line enter:
1 2 3 |
C:\>cd %JAVA_HOME%/bin C:\Program Files\Java\jdk1.8.0_45\bin>keytool -genkey -alias tomcat -keyalg RSA |
You will be asked to enter some information about your name, company etc.:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
C:\Program Files\Java\jdk1.8.0_45\bin>keytool -genkey -alias tomcat -keyalg RSA Enter keystore password: What is your first and last name? [Unknown]: Malte Sander What is the name of your organizational unit? [Unknown]: What is the name of your organization? [Unknown]: Tutorial Academy What is the name of your City or Locality? [Unknown]: Munich What is the name of your State or Province? [Unknown]: Bavaria What is the two-letter country code for this unit? [Unknown]: DE Is CN=Malte Sander, OU=Unknown, O=Tutorial Academy, L=Munich, ST=Bavaria, C=DE correct? [no]: yes Enter key password for <tomcat> (RETURN if same as keystore password): C:\Program Files\Java\jdk1.8.0_45\bin> |
The default password is changeit. We used TutorialAcademy. Now you should have a “.keystore” file in your USER folder. 3.…
Read More