It’s been a while since I last posted on here, but I’m going to try to post a lot more regularly now.
The reason behind this post is that, earlier today I needed to set up a secure domain on my local host.
So being that I had to have a secure domain to test an api wrapper I was setting up for homeaway, I needed to set this up as quickly as I could.
Unfortunately it wasn’t as straight forward as I had expected, so I thought I’d document it here to make sure that other’s don’t have the same issues.
Check that the key and crt files are in place at C:\Program Files (x86)\Zend\Apache2\conf
You are looking for server.key and server.crt in that directory.
Next you need to go to C:\Program Files (x86)\Zend\Apache2\conf\httpd.conf and uncomment the following line
If you restart apache now you will get an error
Syntax error on line 56 of C:/Program Files (x86)/Zend/Apache2/conf/extra/httpd-ssl.conf:
SSLSessionCache: Invalid argument: size has to be >= 8192 bytes"
There are a couple steps to take to avoid that error.
Make a link to Program Files directory instead of using brackets. With the (x86) in place Zend Server is unable to read the cache file which causes the error.
You will need to open a command line as administrator and run the following command
mklink /J "C:\Program Files\Zend" "C:\Program Files (x86)\Zend"
Modify the SSLSessionCache line in https-ssl.conf to
SSLSessionCache "shmcb:C:\Program Files\Zend\Apache2\logs/ssl_scache(512000)"
Now, I had read up on this issue previously, but none of the guides showed an error after this point, which I was having.
I had to comment the final line in the httpd-ssl.conf so it now looks like this
You can restart apache now and it should restart without issues now.
Add your virtual host
This is how my virtual host looks now
DocumentRoot "E:\wamp\www\modules\public" <Directory "E:\wamp\www\modules\public"> Options +Indexes +FollowSymLinks DirectoryIndex index.php Order allow,deny Allow from all AllowOverride All </Directory>
SSLEngine on SSLCertificateFile "C:\Program Files (x86)\Zend\Apache2\conf\server.crt" SSLCertificateKeyFile "C:\Program Files (x86)\Zend\Apache2\conf\server.key" # SSLCertificateChainFile ""
# include the folder containing the vhost aliases for zend server deployment Include "C:\Program Files (x86)\Zend\ZendServer\etc\sites.d\https\modules.com\443/*.conf"
Restart Zend Server and you should then have your new virtual host in place on https