Header Ads

  • New Updates

    How enable https or add ssl certificate in Wamp Apache Server


    I have my Wamp server installed in Windows 2012 R2 server.

    My Wamp Version

    Version : Wamp 3.14

    To enable https in your Apache server first you need to download all you certificate file from your SSL providers and edit few configuration files in Wamp folder as shown below,


    Go to D:\wamp64\bin\apache\apache2.4.35\conf\httpd.conf this location find httpd.conf file in you Wamp folder then search and remove "#" symbol from below 2 lines

    LoadModule ssl_module modules/mod_ssl.so 

    Include conf/extra/httpd-ssl.conf


    Then save the file.

    Then, Download all your certificate file from your ssl providers and save it in one folder foldername "cert" . I saved it in D:/wamp64/bin/apache/apache2.4.35/conf/extra/cert/ .
    Then convert yourwebsit.co.in.cert to .crt

    At last edit httpd-ssl.conf file from D:\wamp64\bin\apache\apache2.4.35\conf\extra\httpd-ssl.conf



    Listen 443
    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
    SSLPassPhraseDialog  builtin

    SSLSessionCacheTimeout  900

    <VirtualHost *:80>
        ServerName yourwebsite.co.in:80
     Redirect / https://yourwebsite.co.in
     
    </VirtualHost>

    <VirtualHost _default_:443>

    #   General setup for the virtual host
    ServerAdmin administratr@yourwebsite.co.in
        DocumentRoot "D:/wamp64/www"
        ServerName yourwebsite.co.in:443
        ServerAlias  yourwebsite.co.in:443

    #   SSL Engine Switch:
    #   Enable/Disable SSL for this virtual host.
    SSLEngine on
    SSLCertificateFile "D:/wamp64/bin/apache/apache2.4.35/conf/extra/cert/yourwebsite.co.in.crt"
    SSLCertificateKeyFile "D:/wamp64/bin/apache/apache2.4.35/conf/extra/cert/yourwebsite.co.in.key"
    SSLCertificateChainFile "D:/wamp64/bin/apache/apache2.4.35/conf/extra/cert/yourwebsite.co.in.ca-bundle"   


    <FilesMatch "\.(cgi|shtml|phtml|php)$">
        SSLOptions +StdEnvVars
    </FilesMatch>
    <Directory "${INSTALL_DIR}/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
      </Directory>

    BrowserMatch "MSIE [2-5]" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0


    </VirtualHost>                                 


    Done Restart Wamp services and test :)

    No comments

    Post Top Ad

    Post Bottom Ad

    Ads