0% found this document useful (0 votes)
267 views12 pages

(SOLVED) How To Set Up HTTPS With OpenSSL in WAMP Server - From Mind To World

This document provides step-by-step instructions for setting up HTTPS using OpenSSL on a WAMP server. It describes creating an SSL certificate and key, editing Apache configuration files to enable SSL and specify the certificate locations, and testing the HTTPS functionality. The instructions include editing httpd.conf, php.ini, and httpd-ssl.conf files and restarting Apache.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
267 views12 pages

(SOLVED) How To Set Up HTTPS With OpenSSL in WAMP Server - From Mind To World

This document provides step-by-step instructions for setting up HTTPS using OpenSSL on a WAMP server. It describes creating an SSL certificate and key, editing Apache configuration files to enable SSL and specify the certificate locations, and testing the HTTPS functionality. The instructions include editing httpd.conf, php.ini, and httpd-ssl.conf files and restarting Apache.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

fromMindtoWorld
Anotherspacetosharemythoughts
3DEC2011

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer
postedinTipsnTrickbyfash7y
IamusingWAMPServer2.2(32bits)(hp://www.wampserver.com/en/dl32.php),whichcontains:
Apache2.2.17
Php5.3.8
Mysql5.5.16
PhpMyadmin3.4.5
SQLBuddy1.3.3
XDebug2.1.2
webGrind1.0
XDC1.5
Butaftergooglinginsomeplaces,hereandthere..
IvejustrealizedthatIneedthisApache2.2.11(includeOpenSSL)(hp://downloads.sourceforge.net/wampserver/WampServer2
APACHE2211.exe?download),
tocontinueworkingusingOpenSSL(hp://opensslforwindows.googlecode.com/les/openssl0.9.8k_WIN32.zip).
https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
Okay,letsdothenextsteps.

1/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

Okay,letsdothenextsteps.
1.CreateSSLCerticateandKey
a.EkstrakOpenSSLtoyourdirectory,andcopythisle:
openssl.cnfto.\Apache2.2.11\conf\
fromfolderbin,copyalllesto.\Apache2.2.11\bin\
//Replacetheoldles!
b.OpenDOScommandwindowbytyping`CMD`inyoursearchmenu.
c.TypethiscdC:\wamp\bin\apache\apache2.2.11\bin
d.Createaserverprivatekeywith1024bitsencryptionbyenteringthiscommand:opensslgenrsades3outserver.key1024
//Itllaskyouapassphrase(password),justenteranypasswordyoulike.
e.RemovethepassphrasefromtheRSAprivatekey(whilekeepingabackupcopyoftheoriginalle).Enterthis:
copyserver.keyserver.key.org
opensslrsainserver.key.orgoutserver.key
//Itllaskyouthepassphrase,justtypeit.
f.CreateaselfsignedCerticate(X509structure)withtheRSAkeyyoujustcreated.Enterthis:opensslreqnewx509nodessha1days
365keyserver.keyoutserver.crtcongC:\wamp\bin\apache\apache2.2.11\conf\openssl.cnf
2.Copytheserver.keyandserver.crtles
a.IntheApache2.2.11\conf\,createtwofoldersnamedasssl.keyandssl.crt
b.Copytheserver.keyletossl.keyfolderandserver.crtletossl.crtfolder
3.Editthehpd.confle,php.ini,andhpd_ssl.conf
a.Openhpd.confle
https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
b.Removethecomment#atthelinewhichsays:LoadModulessl_modulemodules/mod_ssl.so

2/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

b.Removethecomment#atthelinewhichsays:LoadModulessl_modulemodules/mod_ssl.so
c.Removethecomment#atthelinewhichsays:Includeconf/extra/hpdssl.conf
d.Openthisle>C:\wamp\bin\php\php5.3.8\php.ini
e.Removethecomment;atthelinewhichsays:extension=php_openssl.dll
f.Openthisle>C:\wamp\bin\apache\Apache2.2.11\conf\extra\hpd_ssl.conf
g.Findthelinewhichsays:<VirtualHost_default_:443>.
h.Rightafterit,changethelinewhichsays:
ChangethelineDocumentRoottoDocumentRootC:/wamp/www/
ChangethelineServerNametoServerNamelocalhost:443
ChangethelineErrorLog.toErrorlogC:/wamp/bin/apache/Apache2.2.11/logs/sslerror.log
ChangethelineTransferLog.toTransferLogC:/wamp/bin/apache/Apache2.2.11/logs/sslaccess.log
ChangethelineSSLCerticateFile.toSSLCerticateFileC:/wamp/bin/apache/Apache2.2.11/conf/ssl.crt/server.crt
ChangethelineSSLCerticateKeyFile.toSSLCerticateKeyFileC:/wamp/bin/apache/Apache2.2.11/conf/ssl.key/server.key
Changethelinewhichsays<DirectoryC:/ProgramFiles/ApacheSoftwareFoundation/Apache2.2/cgibin>orsomethinglikethat
(sorryImforgetwhatitsdefaultdir:p)to<DirectoryC:/wamp/www/>
Addthefollowinglinesinsidethose<Directory></Directory>tags:
OptionsIndexesFollowSymLinksMultiViews
AllowOverrideAll
Orderallow,deny
allowfromall
ChangethelineCustomLogtoCustomLogC:/wamp/bin/apache/Apache2.2.11/logs/ssl_request.log
4.Makesureitworks!
a.InthepreviousDOSCommandwindows,enterhpdt.IfitdisplaysSysntaxisOK,thengotonextstep.Ifnot,thencorrectthewrong
syntaxandredostep3.
b.RestarttheApacheserver.Ifrestartissuccessful,thenopenthebrowserandenterhps://localhost/(hps://localhost/)
Howitgoes?Works,eh?Congra!
Aaandlastly,toredirectnonhpsenteredlinktohps,dothis.
https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
1.Openle.\Apache2.2.11\conf\hpd.conf

3/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

1.Openle.\Apache2.2.11\conf\hpd.conf
2.Addthisafterthelastline
RewriteEngineOn
RewriteCond%{HTTPS}o
RewriteRule(.*)hps://%(hps://%){HTTP_HOST}%{REQUEST_URI}
3.Trythis:hp://localhost(hp://localhost)
Screenshot

(hps://fash7y.les.wordpress.com/2011/12/hpslocal.png)
References:
1.hp://www.wampserver.com/phorum/read.php?2,32986,page=1(hp://www.wampserver.com/phorum/read.php?2,32986,page=1)
2.hp://www.sslshopper.com/apacheredirecthptohps.html(hp://www.sslshopper.com/apacheredirecthptohps.html)

https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/

4/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld
Abouttheseads(https://wordpress.com/abouttheseads/)

coding,hps,openssl,ssl,wamp,wampserver,wampserver2.2 42Comments

42thoughtson[SOLVED]HowtosetupHTTPSwithOpenSSLin
WAMPServer
Bilal
August28,2012at6:44PM
Instep3partc:
Igotanissue,thatbydoingthisstepmywampserverisnotworkinganymore.Pleasehelpmetosolvethisissue.
Thanksinadvance.
Regards:
fash7y
September10,2012at10:23AM
Well,removingthe#characterin3.c.isjustforactivatingthefeatureofsslinwamp.Makesureyouedittherightline.
JacobLAU
December11,2012at10:02AM
https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
Dear,

Reply

Reply

5/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

Dear,
Itstillcantworkafterstep3candimakesurechangetherightline!!!!Pleasehelpustosolve.
Thanks.
maxatan
November29,2012at7:42PM
Goodtuto!
Buttworemarks:
1.f:YouwroteCreateaselfsignedCerticatecongC:\wamp\bin\apache\apache2.2.8\.YoushouldwriteCreateaself
signedCerticatecongC:\wamp\bin\apache\apache2.2.11\
3.c:YouwroteRemovethecomment#atthelinewhichsays:Includeconf/extra/hpd_ssl.conf.YoushouldwriteRemovethe
comment#atthelinewhichsays:Includeconf/extra/hpdssl.conf
fash7y
January30,2013at9:29AM
Ah,yes.Thanksforcorrecting.
alvin
December17,2012at1:15AM
iamusingport8080.instep4b,thewampcantberestarted.WhatshouldIdo?Thewampcolorisorange
fash7y
January30,2013at9:44AM
Well,sometimes,itloadsabitmorelongerthanexpected.
JB
January3,2013at9:22PM
Hi
Thanksforthis.Atstep4a)Igetthiserror:

https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
D:\wamp\bin\apache\Apache2.2.17\bin>hpdt

Reply

Reply

Reply

Reply

6/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

D:\wamp\bin\apache\Apache2.2.17\bin>hpdt
hpd:Syntaxerroronline119ofD:/wamp/bin/apache/Apache2.2.17/conf/hpd.conf:Cannotload
D:/wamp/bin/apache/Apache2.2.17/modules/mod_ssl.sointoserver:
%1isnotavalidWin32application.
WhatcanIdo;(
fash7y
January30,2013at9:47AM
YouneedApache2.2.11whichincludesOpenSSL.
JK
January16,2013at5:52PM
stillnotworking
JK
January16,2013at6:08PM
Itsworking.problemwasssl_request.loglepathmistake.
fash7y
January30,2013at9:47AM
ca
February18,2013at5:26PM
ManIloveu!!

Reply

Reply

Reply

Reply

Reply

Reply
pavan
March4,2013at8:21PM
OOOmanitworks..Thanku
CustomLogC:/wamp/bin/apache/Apache2.2.17/logs/ssl_request.log%t%h%{SSL_PROTOCOL}x%{SSL_CIPHER}x\%r\%b
anddeletemarkwhilecopingfromsiteandtypeitagain..
https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/

7/12
Reply

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

Reply
vagelism
April24,2013at11:47PM
Hello,nicetutorial.
Doesthisworkfortheapache22also?
Itrieditandchangeeverythingthatis11to22anddontworkMaybeIdosomethingwrongorIneedtocheckagainthesyntax.
Thankyouforyourtime!
vagelism
April25,2013at12:28AM
WorksgreatbutwhenIaddthelastpieceofcodeaboutredirectionthepagedontworkatalleveninhpsmode
vagelism
April25,2013at12:37AM
Solvedthatwasrouter433portclosed!

Reply

Reply

vagelism
April25,2013at12:47AM
OnlytheredirectionisnotworkingIdontknowwhybutwhenIcopyandpastethiscodeanddorestart.noteventhelocalpage
dontwork!
fash7y
May2,2013at7:58AM
Makesure.Edittherightle.Openle.\Apache2.2.11\conf\hpd.conf
miquel
June11,2013at2:36PM
Thankyouverymuch,yousavedmylife
actunderdc
June25,2013at2:28AM

https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
Thatredirectpartfromhptohpsdoesntwork(wamptrayiconremainsorangeafterrestart,doesntturngreen).Also

Reply

Reply

Reply

8/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

Thatredirectpartfromhptohpsdoesntwork(wamptrayiconremainsorangeafterrestart,doesntturngreen).Also
localhost/phpmyadmindoesntworkanymoreaftermakingthosechangestosetuphps.(TherequestedURL/phpmyadmin/wasnot
foundonthisserver.)
Anyhelp?
Reply
fash7y
July12,2013at6:27AM
Haveyoualreadydoneallthosestepsabove?Thosebasedonmydir.Ifyousetupw/dierencedir,thenchangeemtoyours.
Pingback:OpenSSLinWAMP

Reply

stevewid2thedoes(@foreverinour)
July3,2013at3:44AM
whenicreateakey,itdoesntaskforapassphrase.whenitrytoopensslreqcommanditsaysnosuchleordirectory
.\crypto\bio\bss_le
Reply

stevewid2thedoes(@foreverinour)
July3,2013at7:27PM
neverigotit.butapparentlywealreadyhaveacerticatefromdigicertwhichincludesa.crtand.keyle.doijustcopythelesin
thosefolders,orhavetodosomeopensslimport
stevewid2thedoes(@foreverinour)
July3,2013at7:59PM
nevermindigotheh.youcanprobalydeletethecommentsifyouwant
Yordee
August16,2013at7:10AM
Gnial!CestTOP!!Mercimec!
mina
November21,2013at2:42AM
https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
everythingworkedperfectly,jutsthelastpieceofcommand,whenirestartallservices,theiconstaysorange.

Reply

Reply

Reply

9/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

everythingworkedperfectly,jutsthelastpieceofcommand,whenirestartallservices,theiconstaysorange.
Idideverythingbeforeitandicheckedandeverythingworksperfectlyifidontusethelastpieceofcode.Soicanusethewebsite
throughhp,andhps,butijustwantittobehps.
imcopyingthecodeafterIncludeC:/wamp/alias/*,isthisright?orwheredoihavetoplacethatpieceofcode?
RandolphGamo
December2,2013at5:05PM
helloadminigonethroughallstepsbutimstillhavingthiserror
Servernotfound
RandolphGamo
December2,2013at7:50PM
Ohhhhthankyouadminitworks.reallygoodjob

Reply

Reply

Reply

kishore
December19,2013at4:37AM
GreattutorialforSSL.Everythingisworkingne.ButatlastiamgeingmessageSERVERCONNECTEDwhiletryingtoaccess
websitewithHTTPS.butworkingneforHTTP.canyousuggestmeplz.

Reply

jake
December28,2013at11:42AM
geingthiswith2.4.4.everythingelseseemedtogosmooth.
hpd.exe:Syntaxerroronline162ofC://hpd.conf:Cannotloadmodules/mod_ssl.sointoserver:Thespeciedmodulecouldnotbe
found.
Dheivendiran
January3,2014at12:27AM
Thankyouitisworkingne.
LarsFaye
https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
March6,2014at4:40AM

Reply

Reply
10/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

March6,2014at4:40AM
ThisROCKED.Damnit,THANKYOU!
Reply

Leo
March12,2014at9:58PM
Ifollowedallthestepsbutthewamptrayiconstaysorangeandwhenidothehpdttestitsays:DocumentRootmustbeadirectory
Leo
March12,2014at10:46PM
okayifoundoutwhattheproblemwasiwascopy/pastingthelinesfromthispageandtherewasadierentformattothe
symbolsinthepaths(whenpastedinnotepad)soihadtotypethemanually.nowitworks!

Reply

Reply

Sneha
March14,2014at7:06PM
Hi..yourtutorialisveryusefull..ButstilliamgeingUnabletoconnecttotheserverforhps:\\localhost\
Whenientered(4.a)hpdtoncommandprompt,idogetresultasSyntaxisOKthenwhymeserverisnotgeingconnected.
fash7y
May5,2014at9:05AM
MightbetheFirewall.Turnito.
Jess
May23,2014at6:00AM
Ihavethesameproblem,myconsolesaythateverythingisok,andrewalliso.
Butmyerrorlogsay:AH00016CongurationFailed.

Reply

Reply

Where?
Andthanks!!
fash7y
May23,2014at10:26AM

Reply

https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/
Makesureyouhavethesamenamein/etc/hostnameaswellasintheServerNameoptionin/etc/hpd/conf/hpd.conf.Ifyou 11/12

6/23/2016

[SOLVED]HowtosetupHTTPSwithOpenSSLinWAMPServer|fromMindtoWorld

Makesureyouhavethesamenamein/etc/hostnameaswellasintheServerNameoptionin/etc/hpd/conf/hpd.conf.Ifyou
uselocalhost,usethesameintheotherone.
Reply

zigweed
June12,2014at6:26PM
Greattutorial,ialmostnishthisbutihaveaproblem.Aftericompleteallthesteps,nowwheniaccesshps://localhost,thehpsis
cutanditsays:Thesitessecuritycerticateisnottrusted!
Ifipress:Proceedanyway,thisworksbuthpsiconisstillredandcut.Whatcanido?
Matin
July17,2014at7:44PM
sosososogooooooooooooooooooooooooooooooood:Xiloveyouadmin

Reply

Reply

CreateafreewebsiteorblogatWordPress.com.|TheAdelleTheme.

https://fash7y.wordpress.com/2011/12/03/solvedhowtosetuphttpswithopensslinwamp/

12/12

You might also like