With the importance of HTTPS for security and SEO (according to Google), you need a development environment that lets you run your site locally on https. Unfortunately, right out of the box, WampServer only includes a parts of what you need to get your local web server running over https://localhost.
In this article, we will go over the exact steps you can follow to get HTTPS / SSL working on your Wamp Server. These instructions assume that you are installing the 64-bit version of WampServer for Windows to your c: drive. If not, just replace c: with d:. You may also need to change the version number in some of the paths depending on when you downloaded Wamp Server.
How to use WAMP + SSL to open localhost over https:
- Download & install WampServer.
- Open a command prompt (WindowsKey + R > cmd > click OK) and enter the following commands.
openssl genrsa -aes256 -out private.key 2048
openssl rsa -in private.key -out private.key
openssl req -new -x509 -nodes -sha1 -key private.key -out certificate.crt -days 36500 -config c:\wamp64\bin\apache\apache2.4.27\conf\openssl.cnf
Note: You can pretty much answer the questions any way you want though real answers are best. The one question that really matters here is the FQDN. It should be: localhost
- Using a text editor like Notepad, open c:\wamp64\bin\apache\apache2.4.27\conf\httpd.conf and un-comment following 3 lines:
LoadModule ssl_module modules/mod_ssl.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
- Using a text editor like Notepad, open c:\wamp64\bin\apache\apache2.4.27\conf\extra\httpd-ssl.conf and apply the following changes:
Below the line: <VirtualHost _default_:443>, check the following parameters to ensure they are configured correctly and not commented.
- Save the file and close it.
- You are done. To check the validity of file, at the command prompt, enter:
and then use your web browse to go to https://localhost/
From this point on, you should be able to start, stop and restart Wamp Server and SSL-HTTPS will continue to work.