Setting up HTTPS using SSL on window Apache environment

Follow below instructions to install the SSL on Apache.

  • Ensure port 443 is open on window
  • Click on the Windows Start Button
  • Click Windows Firewall
  • When the Firewall window opens look the the Advanced settings on the left hand side of the window
  • When the Advanced Firewall wondows opens, look again on the left hand side for Inbound Rules
  • When the Inbound/Outbound Rules window opens up, Enable rules which having port 443
  • Download latest Apache with ssl version (http://www.anindya.com/)
  • Copy all certificate files in apache conf folder.In my case my all certificates are “C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf”
  • Make sure certificates should have .key and .crt files.if you are thinking to create certificate in here is the link (http://blog.lifebloodnetworks.com/?p=677)
  • Find Apache conf file call httpd.conf .
  • Make a copy of httpd.conf file and edit the existing one.
  • Enable mod_ssl and mod_rewrite module in httpd.conf file
  • Add code “Listen port 443” in httpd.conf file
  • Add the SSL <Virtualhost> block in httpd.conf  file

    <VirtualHost 192.168.0.1:443>
    DocumentRoot /var/www/html2
    ServerName www.test.com
    SSLEngine on
    SSLCertificateFile  /path/to/your_domain_name.crt
    SSLCertificateKeyFile  /path/to/your_private.key
    SSLCertificateChainFile  /path/to/DigiCertCA.crt
    </VirtualHost>

  • Redirect All HTTP traffic to HTTPS.Add below line of code
  • Test your Apache config before restarting.
  • Restart Apache.

Note : ’SSLEngine On’ command wouldn’t work without adding SSLCertificateFile command.you can not test SSLEngine On command alone without adding certificate. Also, Make sure openssl.exe working correctly.

This entry was posted in Apache, Categories. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *