WAMP – Install SSL/HTTPS (2023+)

Here we wrote ALL NECESSARY STEPS, to explain how to install SSL & use HTTPS on WampServer  (just change red words to your actual path) :

  1. Click in tray WAMP > Apache > Apache Modules and check socache_shmcb_module (wait for restart and do the same for ssl_module ).
  2. 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
  3. (Don’t close CMD). Now in Windows, go to folder: c:\wamp\bin\apache\apacheX.X.XX\conf, open httpd.conf and :
     A) Below line Define APACHE_DIR if there is not already Define SRVROOT, then add this:
    Define SRVROOT ${APACHE_DIR}/
     B) find & uncomment this line:
    Include conf/extra/httpd-ssl.conf
  4. 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"
  5. Save file (in that opened cmd typehttpd -t to ensure the status is ok), then Restart WAMP-server and access https://127.0.0.1 (or https://localhost)
  6. 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 address chrome://flags/#allow-insecure-localhost and set that to enabled, and restart Browser).https://127.0.0.1/

2 thoughts on “WAMP – Install SSL/HTTPS (2023+)”

  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

Leave a Comment

Your email address will not be published. Required fields are marked *

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.