WampServer – SSL per vhost

Enable SSL on WAMP

Edit conf/httpd.conf

un-comment (remove the #) the following 3 lines:

LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

Generate cert and key files

https://www.selfsignedcertificate.com/

Update /conf/extra/httpd-ssl.conf

<VirtualHost myproject.local.test:443>
    DocumentRoot "D:/arvil/Projects/vhosted/myproject.local.test/public_html"
    ServerName myproject.local.test:443
    ServerAdmin xxx@xxx.com
    
     <Directory "D:/arvil/Projects/vhosted/myproject.local.test/public_html">
        AllowOverride All
        Require local
    </Directory>
          
 
    SSLEngine on
 
    SSLCertificateFile "D:/arvil/Projects/vhosted/myproject.local.test/myproject.local.test.cert"
    SSLCertificateKeyFile "D:/arvil/Projects/vhosted/myproject.local.test/myproject.local.test.key"
 
    <FilesMatch "\.(cgi|shtml|phtml|php)$">
        SSLOptions +StdEnvVars
    </FilesMatch>
    <Directory "D:/Applications/wamp64/bin/apache/apache2.4.37/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>
    BrowserMatch "MSIE [2-5]" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0
		
</VirtualHost>