Here we wrote ALL NECESSARY STEPS, to explain how to install SSL & use HTTPS
on WampServer (just change red words to your actual path) :
- Click in tray WAMP > Apache > Apache Modules and check socache_shmcb_module (wait for restart and do the same for ssl_module ).
- Open
CMD
and execute these commands one-by-one (if asked, type i.e. abcd for password-phrase).cd c:\wamp\bin\apache\apacheX.X.XX\bin
(echo [ my_req_ext ] && echo subjectAltName = DNS:localhost, DNS:*.localhost, IP:127.0.0.1) >> ..\conf\openssl.cnf
openssl genrsa -aes256 -passout pass:ABCDE -out mypriv.key 2048 && openssl rsa -in mypriv.key -passin pass:ABCDE -out mypriv.key openssl req -new -x509 -nodes -sha1 -key mypriv.key -out mycert.crt -days 44444 -config ..\conf\openssl.cnf -extensions my_req_ext -subj "/C=US/ST=Distributed/L=Cloud/O=Cluster/CN=localhost" copy mypriv.key ..\conf\mypriv.key /y && copy mycert.crt ..\conf\mycert.crt /y
- (Don’t close CMD). Now in Windows, go to folder: c:\wamp\bin\apache\apacheX.X.XX\conf, open httpd.conf and :
A) Below lineDefine APACHE_DIR
if there is not alreadyDefine SRVROOT
, then add this:
Define SRVROOT ${APACHE_DIR}/
B) find & uncomment this line:
Include conf/extra/httpd-ssl.conf
- In conf\extra\httpd-ssl.conf file find
<VirtualHost _default_:443>, and below it re-set :DocumentRoot "${INSTALL_DIR}/www" ServerName localhost:443 ... ... SSLCertificateFile "${SRVROOT}/conf/mycert.crt" ... SSLCertificateKeyFile "${SRVROOT}/conf/mypriv.key"
- Save file (in that opened
cmd
typehttpd -t
to ensure the status isok
), then Restart WAMP-server and accesshttps://127.0.0.1
(orhttps://localhost
) - You will get warning but click
Advanced >Proceed
That’s all!
(You can also disable a warning for our “self-signed” certificate. In browser, go to addresschrome://flags/#allow-insecure-localhost
and set that toenabled
, and restart Browser).https://127.0.0.1/
Hello,
Nice guide. Is it possible to write another one, specifically for Let’s Encrypt, WAMP 3.17.xx and Apache 2.4.xxx on Windows???
Thank you!
DK
Over step 4: certificate key must be SSLCertificateKeyFile