I\'m trying to configure my home server to accept SSL Connection on port 443.
I\'ve www.mydomain.com domain, I\'ve just linked Apache2 and Tomcat, using mod_jk, now I wi
I found the solution, so my Apache and Tomcat work fine... I' going to summarize the steps to solve the problem:
Considering, you have mydomain certificate (signed by GoDaddy) correctly installed and stored within Apple KeyChain of my Mac Server.
Private Key:
umask 0077
openssl pkcs12 -in pkfilename.p12 -nocerts -nodes -out filename-key.pem
umask 0022
Certificate:
openssl pkcs12 -in certfilename.p12 -clcerts -nokeys -out filename-cert.pem
Copy filename-key.pem and filename-cert.pem within /etc/apache2/ directory
VirtualHost
for 443 (https port) connection.Anyway, add 1 VirtualHost for each ServerName you wish to secure, for instance I just want to secure mydomain.com incoming connection:
DocumentRoot "/Library/ApacheTomcat/apache-tomcat-6.0.33/webapps/MyServerAppName"
ServerName mydomain.com
ErrorLog "/private/var/log/apache2/https_mydomain.com-error_log"
CustomLog "/private/var/log/apache2/https_mydomain.com-access_log" common
SSLEngine On
SSLCertificateFile /etc/apache2/filename-cert.pem
SSLCertificateKeyFile /etc/apache2/filename-key.pem
JkMountCopy On
JkMount /* ajp13
Add Listen 443
in httpd.conf file, just add this line under Listen 80
you find at beginning of it.
You now can surf both http:// mydomain.com and https:// mydomain.com.
In case of error you can read the log files within /var/log/apache2/
.
Special thanks to Bruno user, how help me on creating privatekey and certificate file (step 3 and 4).
I hope this guideline can help you configuring Apache and Tomcat on mod_jk for Secure SSL connections.