How to enable SSl on Wamp Server(apache2) - HTTPS Configuration

In this article, I will show how to Configure/Enable SSL in Wamp Server.I have installed wampserver with apache 2.2.12 and php 5.3.5. I have to configure the Open SSL server.

How to Setup HTTPS SSL on WAMP Server for apache 2.2

1. Install WAMPServer

2. Open Control Panel

3. Click System >> Select Advanced System Setting >> Select Environment Variables.

4.Create new system variable OPENSSL_CONF:
   Value: C:\wamp\bin\apache\apache2.2.12\conf\openssl.cnf

5. Create a SSL Certificate and Key for the Web Server 

 Open command prompt  and Run the following commands:

>cd wamp\bin\apache\apache2.2.12\bin

>openssl genrsa -des3 -out server.key 1024

>copy server.key

>openssl rsa -in -out server.key

>openssl req -new -x509 -nodes -sha1 -days 365 -key server.key -out server.crt -config          C:\wamp\bin\apache\apache2.2.12\conf\openssl.cnf

Create a folder c:\wamp\OpenSSL with the following subfolders:

  i. certificats
ii. private

Copy server.cert, server.csr, server.key files
 from C:\wamp\bin\apache\Apache2.2.12\bin to C:\wamp\OpenSSL\certificats folder

Copy file from
 C:\wamp\bin\apache\Apache2.2.12\bin to C:\wamp\OpenSSL\private folder

6. Open Php.ini file

 Remove comment of following line:


 Left click the wampserver icon >> PHP >> php extensions >> click php_openssl

7. Open Httpd.conf file (C:\wamp\bin\apache\Apache2.2.12\conf\)

Remove comment of following lines:

LoadModule ssl_module modules/

LoadModule setenvif_module modules/

Include conf/extra/httpd_ssl.conf

8.Open httpd-ssl.conf file(C:\wamp\bin\apache\Apache2.2.12\conf\extra\)

 Find and replace follwing lines:

 SSLMutex default

 DocumentRoot "C:/wamp/www"

 ErrorLog "C:/wamp/logs/ssl_ErrorLog.txt"
 TransferLog "C:/wamp/logs/ssl_TransferLog.txt"

 SSLCertificateFile "C:/wamp/OpenSSL/certificats/server.crt"

 SSLCertificateKeyFile "C:/wamp/OpenSSL/certificats/server.key"

 CustomLog "C:/wamp/logs/ssl_request.txt" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

 Change Directory Tag:

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all 

9.Verify SSL/HTTPS

  • Run httpd –t and make sure the syntax is OK.
  • Restart Apache.

10.Check whether the WAMP server is running or not

Right click the wampserver icon >> Rsstart All Services
  • If icon is partially red, it means no service is currently running 
  • If icon is White, that means all services are running.

11.Open https://localhost


I hope this article will help you to enable SSL on the Apache server.