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 wish to accept also https request from the web.
This is my configuration:
httpd.conf
<IfModule mod_jk.c>
JKWorkersFile /etc/apache2/workers.properties
JkShmFile /var/log/apache2/mod_jk.shm
JKLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
</IfModule>
<VirtualHost *:80>
DocumentRoot "/Library/ApacheTomcat/apache-tomcat-6.0.33/webapps/MyTomcatAppName"
ServerName www.mydomain.com
ErrorLog "/private/var/log/apache2/www.mydomain.com-error_log"
CustomLog "/private/var/log/apache2/www.mydomain.com-access_log" common
JkMountCopy On
JkMount /* ajp13
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/ApacheTomcat/apache-tomcat-6.0.33/webapps/MyTomcatAppName"
ServerName mydomain.com
ErrorLog "/private/var/log/apache2/mydomain.com-error_log"
CustomLog "/private/var/log/apache2/mydomaino.com-access_log" common
JkMountCopy On
JkMount /* ajp13
</VirtualHost>
Then this is my Worker.properties file:
worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
This is my server.xml:
<Host name="localhost" appBase="/Library/ApacheTomcat/apache-tomcat-6.0.33/webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/Library/ApacheTomcat/apache-tomcat-6.0.33/webapps/MyTomcatAppName" />
With this configuration I correctly surf MyTomcatAppName when I visit http:// www.mydomain.com or http:// domain.com... My issue now is to visit the same website using an https connection, so https:// www.mydomain.com or https:// domain.com. I also have a GoDaddy certificate installed on my Mac Mini Server (Lion osx), so if I type https:// www.mydomain.com (or https:// domain.com) the browser correctly inform me about the presence of a certificate for "mydomain.com", but it also says:
Forbidden
You don't have permission to access / on this server.
Apache/2.2.20 (Unix) mod_ssl/2.2.20 OpenSSL/0.9.8r DAV/2 mod_jk/1.2.30 Server at mydomain.com Port 443
I'm sure this is because I missed something in Virtual Host tag.... So how can I fix it?
https://www.mydomain.com/
, you get an HTTP response (forbidden), HTTPS is already working, so you must somehow have configured theSSL*
options somewhere. Try to set the virtual host where they are (or create one withVirtualHost *:443
if it doesn't already exist) and put theJk*
options there. – Hoicks