I am trying to configure a home server to accept an SSL connection on port 443.
I have a domain www.mydomain.com, I just linked Apache2 and Tomcat using mod_jk, now I want to accept also an https request from the Internet.
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 view MyTomcatAppName correctly when I visit http://www.mydomain.com or http: //domain.com ... My problem now is to visit the same site 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 find https://www.mydomain.com (or https://domain.com), the browser correctly informs me of the 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 the Virtual Host tag .... So how can I fix this?
source share