How To Configure SSL For Windows
Contents |
Download Installer
- Go to http://www.slproweb.com/products/Win32OpenSSL.html and download the Win32 OpenSSL v0.9.7m Light file.
- Close all your Command Dos Windows and install the tool using the wizard.
Create Certificate Files
- Go to the C:\OpenSSL\bin directory and execute openssl.exe binary.
- Enter the 2 following commands and answer the questions :
OpenSSL> genrsa -des3 -out tomcatkey.pem 2048
OpenSSL> req -config openssl.cnf -new -x509 -keyout tomcatkey.pem -out tomcatcert.pem -days 1095
Copy Certificate Files to Tomcat folder
- You will find 2 new files in your current folder. You just have to copy them in your tomcat folder (Environment variable %CATALINA_HOME%).
Activate HTTPS 8443 Port
- Edit the %CATALINA_HOME%\conf\server.xml file and add the following lines :
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
SSLEngine="on"
SSLCertificateFile="C:\Tomcat 5.5\tomcatcert.pem"
SSLCertificateKeyFile="C:\Tomcat 5.5\tomcatkey.pem"
SSLPassword="mypassword"
/>
- Restart your Tomcat Server to activate the SSL.