SSL on WAMPServer - Additional Tips
Posted by: WarriorGov9791 (---.hawaii.res.rr.com)
Date: November 04, 2017 01:21AM

Thank you to RiggsFolly for the tutorial!

My setup:

WAMPServer 3.1.0 (64-bit on a separate partition - g: in my custom installation)
Apache 2.4.29
PHP 7.1.11
MySQL 5.7.20
MariaDB 10.2.10

All of my development sites are running with MariaDB. There are no databases on MySQL. It's just there for fallback, if needed.

In addition to everything in the tutorial, I found out that the socache_shmcb_module also needs to be enabled. To do that, simply left-click the WAMPServer icon in the system notification area, go to Apache | Apache modules | click the 'down arrow' until you see the socache_shmcb_module and left-click the entry. Wait for WAMPServer to process the cmd and automatically restart Apache. If your WAMPServer system tray icon is green and the module has the green checkmark, you are good to go.

I also found a way to run additional sites on SSL. After creating VirtualHosts and the SSL keys and certificates for each site, I added the following code for each site to the end of the httpd-ssl.conf file:

<VirtualHost _default_:443>
	DocumentRoot "g:/wamp64/www/mysitefoldername"
	ServerName mysitename.com:443
	ErrorLog "g:/wamp64/logs/ssl_error.log"
	SSLEngine on
	SSLCertificateFile "g:/wamp64/bin/apache/apache2.4.29/conf/myssl-crtfolder/mysslcertificatename.crt"
	SSLCertificateKeyFile "g:/wamp64/bin/apache/apache2.4.29/conf/myssl-keyfolder/mysslkeyname.key"
	<FilesMatch "\.(cgi|shtml|phtml|php)$">
		SSLOptions +StdEnvVars
	</FilesMatch>
	<Directory "g:/wamp64/www/mysitefoldername.com">
		SSLOptions +StdEnvVars
		Options +Indexes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
	BrowserMatch "MSIE [2-5]" \
			nokeepalive ssl-unclean-shutdown \
			downgrade-1.0 force-response-1.0
	CustomLog "g:/wamp64/logs/ssl_request.log" \
			"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

To run sites with the 'www' prefix in SSL, it was not possible to add ServerAlias to the httpd-ssl.conf file. I created SSL keys and certificates for the sites I wanted to run with the 'www' prefix and added a 'www' version of the above code for each site to the end of the httpd-ssl.conf file.

If something seems to be not working, run the Command Prompt in Administrator mode with the 'httpd -t' command line to check for errors.

Hope this helps anyone wishing to run SSL on their WAMPServer sites. Thank you again to RiggsFolly and the WAMPServer Support Staff for all the help!

Aloha,
Ben D

Windows 7 Ultimate 64-bit • WAMPServer 3.1.1 64-bit
Apache 2.4.29 • PHP 5.6.31 | 5.6.32 | 7.0.25| 7.1.11 • xDebug 2.5.5
phpMyAdmin 4.7.5 • MariaDB 10.2.10 • MySQL 5.7.20
AdMiner 4.3.1 • PHPSysInfo 3.2.8 • OpenSSL 1.1.0g
All VC++ packages installed correctly




Edited 6 time(s). Last edit at 11/04/2017 09:51AM by WarriorGov9791.

Options: ReplyQuote


Sorry, only registered users may post in this forum.