HTTPS wamp
HTTPS wamp
set WAMP_INSTALL_LOCATION="c:\wamp" #modify
1. Open command prompt as admin Goto %WAMP_INSTALL_LOCATION%\bin\apache\apache2.x.x\bin>
2. Type => set OPENSSL_CONF=%WAMP_INSTALL_LOCATION%\bin\apache\apache2.x.x\conf\openssl.cnf
3. Create self signed certificate
Type => openssl req -nodes -new -x509 -keyout server.key -out server.crt
#Note if you get ordinal error , open ssl should be changed download it from http://slproweb.com/products/Win32OpenSSL.html based on 32 bit or 64 bit , select light version(Winxx OpenSSL v1.1.0b Light) and make sure to set libraries under install location rather than system32 folder
After installation copy openssl.exe & dlls from the installation folder and replace on %WAMP_INSTALL_LOCATION%\bin\apache\apache2.x.x\bin
Copy server.crt to folder %WAMP_INSTALL_LOCATION%\bin\apache\apache2.x.x\conf\cert\
Copy server.key to folder %WAMP_INSTALL_LOCATION%\bin\apache\apache2.x.x\conf\key\
4. Edit %WAMP_INSTALL_LOCATION%\bin\apache\apachex.x.x\conf\httpd.conf
Uncomment (remove #) => Ssl_module LoadModule modules / mod_ssl .so
uncomment (remove #) => LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
Uncomment (remove #) => Include conf/extra/httpd-ssl conf
5. Edit %WAMP_INSTALL_LOCATION%\bin\php\php5.x.x\php.ini
Uncomment(remove semicolon) => extension = php_openssl.dll
Edit %WAMP_INSTALL_LOCATION%\bin\apache\apache2.x.x\conf\extra\httpd-ssl.conf
Find the line: <VirtualHost _default_: 443> and comment whole mark and use the below syntax
<VirtualHost _default_:443>
DocumentRoot "{YOUR_VIRTUAL_HOST_FOLDER}"
ServerName virtual.local:443
ServerAdmin xxx@xxx.com
ErrorLog "%WAMP_INSTALL_LOCATION%/logs/sslerror.log"
TransferLog "%WAMP_INSTALL_LOCATION%/logs/sslaccess.log"
<Directory "{YOUR_VIRTUAL_HOST_FOLDER}">
AllowOverride All
Require local
</Directory>
SSLEngine on
SSLCertificateFile "%WAMP_INSTALL_LOCATION%/bin/apache/apache2.x.x/conf/cert/server.crt"
SSLCertificateKeyFile "%WAMP_INSTALL_LOCATION%/bin/apache/apache2.x.x/conf/key/server.key"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "%WAMP_INSTALL_LOCATION%/bin/apache/apache2.x.x/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "%WAMP_INSTALL_LOCATION%/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>