You are on page 1of 8

 

MYTECHBLOG.IN

Install SSL on windows localhost


WAMP HTTP & SSL HTTPS
Ankit Wasankar July 23, 2016 7

Install SSL on windo ws localhost WAMP HTTP + SSL =


HTTPS
Here we are going to see how to install SSL certi cate in Windows localhost
WAMP server.
Lot many times our production servers are installed with SSL certi cates and
our local development machines uses noramal http, and this makes our
development system di erent from our production one. And as a developer
we always like to have an exact environment like our production system. So
here’s the guide how to install self created SSL certi cate on your local WAMP
installation and use Https communication with your local WAMP.

Here are the things w e are going to do


1. Download & install WAMP (Assuming that WAMP is installed in C: directory)
2. Download & install OpenSSL
3. Configure WAMP to use HTTP+SSL=HTTPS

Watch the video tutorial to know about the detailed step by step procedure.
Install SSL on windows localhost WAMP | HTTP + SSL = HTTPS

Step 1:
Download & install WAMP (Assuming that WAMP is installed in C: directory)

Step 2:
Download & install OpenSSL

Step 3:
Con gure WAMP to use HTTP+SSL=HTTPS

1     Path to openssl.exe : C:\wamp\bin\apache\apache2.4.9\bin\openssl.exe


2     Path to openssl.cnf : C:\wamp\bin\apache\apache2.4.9\conf\openssl.cnf

Step 5:
CMD in Path to openssl.exe :::

1     openssl genrsa -aes256 -out private.key 2048


2     openssl rsa -in private.key -out private.key
3     openssl req -new -x509 -nodes -sha1 -key private.key -out certificate.crt -days 36500 -config C:\wamp\bin\

Now copy the privateKey & certi cate into folder

Step 6:
Open httpd.conf & uncomment following

1 LoadModule ssl_module modules/mod_ssl.so


2 Include conf/extra/httpd-ssl.conf
3 LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

Open php.ini (wamp\bin\php\php5.5.12\php.ini)

1 extension=php_openssl.dll

Step 7:

1     C:\wamp\bin\apache\apache x.x.x\conf\extra\httpd-ssl.conf
2     <VirtualHost _default_:443> (Below this line check following parameters)
3 -------------------
4     DocumentRoot "C:/wamp/www"
5     ServerName localhost:443
6     ServerAdmin admin@example.com
7     ErrorLog "C:/wamp/bin/apache/apache2.4.9/logs/ssl_error.log"
8     TransferLog "C:/wamp/bin/apache/apache2.4.9/logs/ssl_access.log"
9
10     SSLCertificateFile "C:/wamp/bin/apache/apache2.4.9/conf/key/certificate.crt"
11     SSLCertificateKeyFile "C:/wamp/bin/apache/apache2.4.9/conf/key/private.key"
12 -------------------

1     httpd -t (To check the validity of file)


About Latest Posts

Ankit Wasankar Follow Me


Programmer at Yardi India Pvt. Ltd.

Author Ankit Wasankar is a Programmer II at Yardi India Pvt. Ltd., loves writing
about the personal experiences with new technologies, specially Python.

CATEGORIES Tech-Guide

TAGS Apache http HTTPD https OpenSSL php Private Key RSA ssl wamp

Wamp Server

Previous article
Material Design vs Non Material Design – Web Designing Dilemma

Next article
Installing Django on IIS: A Step-by-Step Tutorial

7 comments

Brenda January 5, 2017

Thank You!!!

You really helped me today…

Jonathan January 6, 2017

i got 403 problem with using virtual domain, i tried to modify httpd-
ssl.conf with custom virtual domain as:
# General setup for the virtual host
DocumentRoot “D:/path to web root”
ServerName dev.example.com:443

I want access URL via HTTPS as : https://dev.example.com. Please


help.
Abdulwahab January 20, 2017

Dear Ankit,
First, thank you for your try to make this procedure easier. but in the
article above you said “download and install OpenSSl” without
mentioning that I have to download the compiler from “OpenSSL
shining light production” not the original code of OpenSSL project.

I spent my whole day trying to install the project until I watched the
video and found where is the mistake.

Please note that using a third-party compiler is not secured for


production environment, that’s why you will not nd a compiler in
OpenSSL project.

Now, How can I compile and install OpenSSL on windows 10 (the easy
way) ?

Ankit Wasankar Post author · January 20, 2017

Hello.
Thanks for pointing out the security risk. As I have mentioned, I
used these compilers just for the localhost. As in production we
already have certi cate or the bundle ready to use. Still I would
look into the better way to make it on localhost. Thanks again.

Sudhir gupta January 20, 2017

when i tried the same.. i found one issue “the ordinal 371 could not
be located in the dynamic link library”
after hours of struggling i found this working solution for me.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
To x the issue, two things are needed:

1) Make sure that you don’t have symbolic links for libeay32.dll and
ssleay32.dll in your Apache bin directory (For example, mine is:
C:\wamp64\bin\apache\apache2.4.23\bin)
If you do have symbolic links (i.e. the le size are 0 bytes), you need
to download the dlls from Apache Lounge. For example, I grabbed
the two .dll les from the 64-bit version of Apache 2.4.23 hosted at
https://www.apachelounge.com/download/

2) Once you have the actual .dll les restored, you need to make sure
that WampServer isn’t overwriting them. WampServer 3 has a
con guration script that runs every time it starts. In that script it will
overwrite those .dlls with symbolic links. You must DISABLE that
functionality. To do so, comment out the references to those two
les in: C:\wamp64\scripts\con g.inc.php (mine were located at lines
133 and 139).

Thanks
Sudhir K gupta
Owner of comedymood.com

Ankit Wasankar Post author · January 20, 2017

Thanks Sudhir for the e orts and helping others.

Petr Novak April 14, 2017

Thank you a lot. Have a nice day Ankit.

LEAVE A REPLY

Comment

Name *
Email *

Website

POST COMMENT

Search … SEARCH

Categories

 C & C++ 42

 Experience 2

 Projects 1

 Python 4

 Tech-Guide 10

 Uncategorized 4

Recent Posts

Top 10 Mistakes that Django Developers Make

Top 10 Most Common C++ Mistakes That Developers Make

The Ultimate List of Resources to Learn C and C++

JSON Web Token Tutorial: An Example in Laravel and AngularJS

How to Integrate OAuth 2 Into Your Django/DRF Back-end Without Going Insane

Tags

AES encryption array base64decode base64encode c language codeigniter

Cognizant c program django download download videos

download videos from gateforum or hulu EBox encrypted cloud data experience

file handling first day at function fuzzy keyword search gateforum https hulu

jaccard jaccard coefficient loop memories mettl misc mysql n gram


operators php prime prime factorial prime numbers PUN14AJ009 batch python

recursion rtmp search ranking self signed certificate sort ssl string

switch case

Archives

May 2017 (1)

April 2017 (2)

March 2017 (1)

February 2017 (4)

January 2017 (3)

July 2016 (1)

May 2016 (2)

April 2016 (1)

October 2015 (2)

August 2015 (1)

January 2015 (1)

November 2014 (1)

July 2014 (40)

Copyright © 2017 MyTechBlog.IN. All Rights Reserved.


Codilight Theme by FameThemes

You might also like