These are the steps I noted down when installing ssl on my localhost wamp installation. I am using windows 7 Professional 64-bit Operating system.
First of all download and install OpenSSL binary from http://slproweb.com/products/Win32OpenSSL.html, I installed http://slproweb.com/download/Win64OpenSSL_Light-0_9_8zb.exe.
Using command line generate private key which is 2048bits encryption.
C:\wamp\bin\apache\apache2.4.9\bin> openssl genrsa -aes256 -out private.key 2048
Enter pass phrase after you run previous command and re-verify pass phrase. e.g. 'password'
Remove the pass phrase by executing:
C:\wamp\bin\apache\apache2.4.9\bin> openssl rsa -in private.key -out private.key
Now we will generate self-signed certificate to use to certify the connection and to encrypt traffic. This certificate will be valid for 100 years, so replace 36500 by the number of the days the certificate is valid for. "certificate.crt" will be our certificate.
C:\wamp\bin\apache\apache2.4.9\bin> openssl req -new -x509 -nodes -sha1 -key private.key -out certificate.crt -days 36500 -config C:\wamp\bin\apache\apache2.4.9\conf\openssl.cnf
Create folders 'key' and 'cert' at: C:\wamp\bin\apache\apache2.4.9\conf
Copy 'certificate.crt' to cert and 'private.key' to key folders respectively.
Uncomment "LoadModule ssl_module modules/mod_ssl.so", "Include conf/extra/httpd-ssl.conf" and "LoadModule socache_shmcb_module modules/mod_socache_shmcb.so" on your C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf file.
Uncomment "extension=php_openssl.dll" on your file C:\wamp\bin\php\php5.5.12\php.ini.
Open C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-ssl.conf and find "<VirtualHost _default_:443>" and below that line find and update below configuration according to your setup:
# General setup for the virtual host DocumentRoot "c:/_projects" ServerName localhost:443 ServerAdmin [email protected] ErrorLog "C:/wamp/bin/apache/apache2.4.9/logs/ssl_error.log" TransferLog "C:/wamp/bin/apache/apache2.4.9/logs/ssl_access.log" # Server Certificate: SSLCertificateFile "C:/wamp/bin/apache/apache2.4.9/conf/cert/certificate.crt" # Server Private Key: SSLCertificateKeyFile "C:/wamp/bin/apache/apache2.4.9/conf/key/private.key"
On the same file replace '<Directory "c:/Apache24/cgi-bin">' with '<Directory "c:/_projects">' and update customLog: CustomLog "C:/wamp/bin/apache/apache2.4.9/logs/ssl_request.log" \
On command line run "httpd -t" and make sure you get syntax OK.
Restart wamp and visit https://localhost you will get warning about not certified certificate. you need to accept warning and continue to start using https.
That's all, you now have local SSL successfully installed :)
My vhosts conf file for one of the project looks like this:
<VirtualHost 127.0.0.1:443> SetEnv MAGE_IS_DEVELOPER_MODE "true" SetEnv MAGE_RUN_CODE "dltrorgau" ServerName dltrorg.dev ServerAlias www.dltrorg.dev ServerAdmin [email protected] DocumentRoot "c:/_projects/dltrorg/trunk" SSLEngine On # Server Certificate: SSLCertificateFile "C:/wamp/bin/apache/apache2.4.9/conf/cert/certificate.crt" # Server Private Key: SSLCertificateKeyFile "C:/wamp/bin/apache/apache2.4.9/conf/key/private.key" <Directory "c:/_projects/dltrorg/trunk"> Options Indexes FollowSymLinks AllowOverride All Order Allow,Deny Allow from all </Directory> </VirtualHost>
Let me know if I need to modify anything. It seems to be working fine for me :)