Part I: Creating SSL Certificate
1- download windows executable file for openssl from http://slproweb.com/products/Win32OpenSSL.html and install it
2- open cmd window
3- cd to [openssl installation directory]/bin e.g if your installation directory is C:Program FilesOpenSSl, then cd to C:Program FilesOpenSSlbin
3- type in following commands
a) openssl genrsa -out privkey.pem
b) openssl req -new -key privkey.pem -out cert.csr
It will ask you few questions, answer them as directed
[enter your private key password]
[enter your two character country code]
[enter your full state or province name]
[enter your city name]
[enter your company name]
[enter your organizational unit or leave it blank]
[enter your common name or fqdn]
[enter your admin email address]
[leave the rest of the attributes blank]
c) openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
It will again ask few questions again. Provide the appropriate answers.
Part II: Configuring Apache/PHP:
(Note: Next steps assume that you have installed wamp at D:)
1 – Copy cert.csr, cacert.pem, privkey.pem from your bin directory to any appropriate directory e.g. d:wampbinapacheapache2.2.6confssl
2- Open your httpd.conf file. You need to make following changes…
a) In httpd.conf file, remove the comment ‘#’ at the line which says: LoadModule ssl_module modules/mod_ssl.so
b) In httpd.conf, remove the comment ‘#’ at the line which says: Include conf/extra/httpd_ssl.conf. Then move that line after this block <IfModule ssl_module>…. </IfModule>
3- open the php.ini file, remove the comment ‘;’ at the line which says: extension=php_openssl.dll
4- Open your conf/extra/httpd_ssl.conf file. You need to make following changes…
a) Find the line which says "SSLMutex…." and change it to "SSLMutex default" without quotes
b) Change the paths provided for DocumentRoot, ErrorLog, TransferLog, and CustomLog to
c) Change the line "SSLCertificateFile …." to
d) Change the line "SSLCertificateKeyFile …." to
e) Change the line <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin"> to <Directory "D:/wamp/www/"> and add the following lines inside <Directory>…</Directory> tags:
Options Indexes FollowSymLinks MultiViews
allow from all
f) add following line after the line that says "AddType application/x-x509-ca-cert .crt"
AddType application/x-x509-ca-cert .pem
5 – Restart the Apache server
This is not working
It worked for me. What issues are you facing?
It worked for me so smoothly 🙂
Now I am able to browse in https 🙂
this is not working on apache 2.2.17 i have done all the things but the server does not get started it is showing the orange color but if i comment the the line in httpd.conf which is saying to include the httpd_ssl.conf then the apache starts fine. Can you tell me why?
You can get an idea of what the issue is by looking at the application log. Right click My Computer, select Manage, then System Tools -> Event Viewer -> Windows Logs -> Application. Here you’ll see list of errors raised by apache or wampapache service. It states the exact line number in conf file that is causing problem.
Did this changes, but still could not use https… The icon have gone green after some tries, but when i do https://localhost it returns an ssl error.
Followed all methods and still had some errors on both version 2.2.22 and version 2.7. However, I checked application log from Event log from. Check all apache error and did what it suggested. Turned off listen 443 in httpd.conf. Only warn _default_VirtualHost port 443 overlay stayed there all the time. Turned out to add
Then it worked.
This worked for me thanks, one thing to note I had to quit skype before I could restart the server!
It worked out for me just fine. When I go to my site using https:// the CSS and Images are being called so I see only text. Any ideas?
I meant to say the CSS and images are NOT being called when using https. Any suggestions.
Works Great! Highly recommended.
Works smoothly for me
Thank you very much
I have done everything smoothly..but not able to browse with https