During installing the SSL on WAMP server, I got best article on http://www.phpjoel.com/2011/04/07/installing-ssl-using-openssl-on-a-wamp-localhost/ & I refer this articles & described the process in details.
Detail steps are as follows.
1. Install OpenSSL
First of all, you need OpenSSL for this to work. OpenSSL comes with wampserver and can be found in the following folder.
D:\wamp\bin\apache\Apache2.4.4\bin\openssl.exe
If wamp server does’t contains OpenSSL then you have to download & install it.
2. GENERATE KEY
In the command prompt, go to D:\wamp\Apache2\bin and run the following command
D:\wamp\bin\apache\Apache2.4.4\bin>openssl req -new > webserver.csr
Processing Result:
Loading 'screen' into random state - done
Generating a 1024 bit RSA private key
...++++++
..++++++
writing new private key to 'privkey.pem'
Enter PEM pass phrase: Enter password
Verifying - Enter PEM pass phrase: Enter password
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]: Add your country code
State or Province Name (full name) [Some-State]: Add your state name
Locality Name (eg, city) []:Add your City
Organization Name (eg, company) [Internet Widgits Pty Ltd]: Add your Company Name
Organizational Unit Name (eg, section) []: Add your Unit Name
Common Name (e.g. server FQDN or YOUR name) []: Add your Domain Name
Email Address []: Add your Email Address
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:Enter password
An optional company name []:Enter optional company name
When the command finishes, it has created several files, including privkey.pem, in
D:\wamp\bin\apache\Apache2.4.4\bin
3. REMOVE PASSPHRASE
Run the following command:
D:\wamp\bin\apache\Apache2.4.4\bin>openssl rsa -in privkey.pem -out webserver.key
Processing Result:
Enter pass phrase for privkey.pem:
writing RSA key
You will be prompted for the pass phrase from the previous step. The RSA key is written and the file webserver.key is now available in the folder.
4. CONVERT INTO SIGNED CERTIFICATE
Run the following command to create a certificate which expires after one year:
openssl x509 -in webserver.csr -out webserver.cert -req -signkey webserver.key -days 365
Processing Result:
Loading 'screen' into random state - done
Signature ok
subject=/C=country code/ST=state name/L=city name/O=orgnization name/OU=orgnization unit name/CN=localhost/emailAddress=email address
Getting Private key
5. STORE CERTIFICATE FILES
Create a folder D:\wamp\OpenSSL with the following subfolders:
/certs
/crl
/newcerts
/private
Copy the following files to /certs/:
webserver.cert
webserver.csr
webserver.key
Copy the following files to /private/:
.rnd
privkey.pem
6. MODIFY HTTPD-SSL.CONF (D:\wamp\bin\apache\Apache2.4.4\conf\extra)
Change the following lines, adjusting the email address and the paths to your settings:
<VirtualHost>
SSLCipherSuite HIGH:!aNULL:!MD5
#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
#SSLHonorCipherOrder on
SSLPassPhraseDialog builtin
DocumentRoot "c:/Apache24/htdocs"
ServerName www.example.com:443
ServerAdmin admin@example.com
ErrorLog "D:/wamp/logs/mysecuresite_error_log"
TransferLog "D:/wamp/logs/mysecuresite_access_log"
SSLCertificateFile "D:/wamp/OpenSSL/certs/webserver.cert"
SSLCertificateKeyFile "D:/wamp/OpenSSL/certs/webserver.key"
SSLCARevocationPath "D:/wamp/OpenSSL/crl"
CustomLog "D:/wamp/logs/ssl_request_log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
7. MODIFY OPENSSL.CNF (D:\wamp\bin\apache\Apache2.4.4\conf)
Modify the base directory:
dir = D:/wamp/OpenSSL
8. MODIFY HTTPD.CONF
Uncomment following lines.
Include conf/extra/httpd-ssl.conf
LoadModule ssl_module modules/mod_ssl.so
Check that port 443 is open by running the following in the command prompt:
netstat -an | more
9. Restart Apache.