What are the steps to install SSL on Wampserver? I have been trying for weeks and was able to get "localhost" to be HTTPS, but none of the Apache virtual hosts work. They just forward to localhost instead of their respective local WordPress installs. Whenever I type https://[some.local.virtual.host] it just loops back to the Wampserver default gray background localhost page. I'm fairly certain I have something configured incorrectly, but I'm not sure what.
For reference, these are steps I have already tried that got me the results above:
Installing HTTPS/SSL on Localhost (Justin Stolpe): [www.youtube.com]
STEPS:
1: INSTALL OPENSSL
- While justin says to download and install OpenSSL, I noticed that it already comes packaged with Wampserver 3.3.1, so I just used that
2: CREATE PRIVATE KEY
- OPEN CMD as admin
- CD to C:\wamp64\bin\apache\apache2.4.54.2\bin\openssl.exe
- In CMD run command:
openssl genrsa -aes256 -out private.key 2048
- Enter and verify whatever passphrase you choose
- NOW, private.key is in the bin folder
- RUN this command (Justin didn't explain why):
openssl ras -in private.key
- Enter pass phrase you chose in the create key step
- Now private key is written
3: CREATE SSL CERTIFICATE
- In CMD run command:
openssl req -new x509 -nodes -sha1 -key private.key -out certificate.crt -days 36500
- NOW FILL IN DATA: Only thing that matters is Common Name: it needs to say `localhost` if you are trying to install the cert on your localhost
- IS EMAIL address necessary? Not sure
4: MAKE A PLACE FOR THE KEY AND CERT TO LIVE
- Create a folder named `key` in:
c:\wamp64\bin\apache\apache[version]\conf
- Move private.key and certificate.crt into key folder
- NOW they have been successfully moved to our wampserver
5: EDIT APACHE CONFIG
- EDIT c:\wamp64\bin\apache\apache[version]\conf\httpd.conf
- UNCOMMENT mod_ssl.so line
- UNCOMMENT httpd-ssl.conf line
- UNCOMMENT mod_socache_shmcb.so
6: EDIT APACHE SSL CONFIG
- EDIT c:\wamp64\bin\apache\apache[version]\conf\extra\httpd-ssl.conf
- Make sure DocumentRoot is "c:/wamp64/www"
- ServerName should be localhost or localhost:80 or however you normally type your localhost
- In my case, I just use plain vanilla `localhost`
- UNCOMMENT SSLCertificateFile "${SRVROOT}/conf/key/certificate.crt
- UNCOMMENT SSLCertificateFile "${SRVROOT}/conf/key/private.key
7: RESTART all wamp services
8: LAUNCH LOCALHOST IN WEB BROWSER
- Launched `[localhost]` in Chrome
- Accept security risk warning
- NOW you should be seeing your website homepage!
For reference, these are steps I have already tried that got me the results above:
Installing HTTPS/SSL on Localhost (Justin Stolpe): [www.youtube.com]
STEPS:
1: INSTALL OPENSSL
- While justin says to download and install OpenSSL, I noticed that it already comes packaged with Wampserver 3.3.1, so I just used that
2: CREATE PRIVATE KEY
- OPEN CMD as admin
- CD to C:\wamp64\bin\apache\apache2.4.54.2\bin\openssl.exe
- In CMD run command:
openssl genrsa -aes256 -out private.key 2048
- Enter and verify whatever passphrase you choose
- NOW, private.key is in the bin folder
- RUN this command (Justin didn't explain why):
openssl ras -in private.key
- Enter pass phrase you chose in the create key step
- Now private key is written
3: CREATE SSL CERTIFICATE
- In CMD run command:
openssl req -new x509 -nodes -sha1 -key private.key -out certificate.crt -days 36500
- NOW FILL IN DATA: Only thing that matters is Common Name: it needs to say `localhost` if you are trying to install the cert on your localhost
- IS EMAIL address necessary? Not sure
4: MAKE A PLACE FOR THE KEY AND CERT TO LIVE
- Create a folder named `key` in:
c:\wamp64\bin\apache\apache[version]\conf
- Move private.key and certificate.crt into key folder
- NOW they have been successfully moved to our wampserver
5: EDIT APACHE CONFIG
- EDIT c:\wamp64\bin\apache\apache[version]\conf\httpd.conf
- UNCOMMENT mod_ssl.so line
- UNCOMMENT httpd-ssl.conf line
- UNCOMMENT mod_socache_shmcb.so
6: EDIT APACHE SSL CONFIG
- EDIT c:\wamp64\bin\apache\apache[version]\conf\extra\httpd-ssl.conf
- Make sure DocumentRoot is "c:/wamp64/www"
- ServerName should be localhost or localhost:80 or however you normally type your localhost
- In my case, I just use plain vanilla `localhost`
- UNCOMMENT SSLCertificateFile "${SRVROOT}/conf/key/certificate.crt
- UNCOMMENT SSLCertificateFile "${SRVROOT}/conf/key/private.key
7: RESTART all wamp services
8: LAUNCH LOCALHOST IN WEB BROWSER
- Launched `[localhost]` in Chrome
- Accept security risk warning
- NOW you should be seeing your website homepage!