SSL in WAMP
Posted by: rayinny (---.nycmny.fios.verizon.net)
Date: December 28, 2015 01:45AM

Is there a foolproof procedure for implementing SSL on WAMP? This is just for development so a self-signed certificate with OpenSSL is fine. Every procedure I've tried thus far has failed. Usually they're too old so your'e sort of reinventing the wheel and that requires expertise. I've spent many long days on this already and Im now at a stand still as there's precious little info on the Web to troubleshoot this. With my latest effort, HTTP is fine but the server is just not responding to HTTPS requests. "https:// localhost" returns an unable to connect error. This is partly my lack of education, I'm really a .NET developer, but I still expected better info on something so routine. If there is no idiot-proof procedure, I wouldn't suggest it but I wouldn't ressist a TeamViewer troubleshoot. LOL. My real interest though is in learning whats wrong with my procedure. Thanks for any help guys.

Options: ReplyQuote
Re: SSL in WAMP
Posted by: RiggsFolly (---.as43234.net)
Date: December 28, 2015 05:27PM

Hi rayinny

I have a processdure that I have used, but to start with can I ask you to answer these questions so we know where we are starting from [forum.wampserver.com]

Also can you add your vhosts-httpd.conf file with your https config in.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: SSL in WAMP
Posted by: rayinny (---.nycmny.fios.verizon.net)
Date: December 29, 2015 01:01AM

Thank you so much for your very prompt response but as usual as soon as I give up I figured things out. Of course the cause of the problem was that required Apache modules were not being loaded. The procedure I followed was from the YouTube video "Install SSL on windows localhost WAMP | HTTP + SSL = HTTPS" [www.youtube.com]. Excellent video and more up-to-date than any other I could find but still dated compared to my recently installed WAMP server and OpenSSL. The problem for me was that on my system there are two copies of each of the httpd.conf and httpd-ssl.conf files, the usual

"\wamp\bin\apache\apache2.4.9\conf\httpd.conf"
and
"\wamp\bin\apache\apache2.4.9\conf\extra\httpd-ssl.conf"
but also
"C:\wamp\bin\apache\apache2.4.9\conf\original\httpd.conf"
and "
C:\wamp\bin\apache\apache2.4.9\conf\original\extra\httpd-ssl.conf".

Well this was not discussed and caused me some confusion. I probably turned on the load instruction for some of the necessary modules in the wrong file when following the instructions. Silly mistake but I am new to Apache. I'm guessing that the stuff in the "original" folder are just backups probably created by the OpenSSL installer. Just guessing though so my fix described below still is to both pairs of files because even now I'm unsure which pair of files is active or if both pairs are active. I first suspected there were problems with modules when I noticed some of the modules displayed in “WampManager > Apache > Apache Modules” had exclamation signs beside them. (Note to newbies: look out for this!) To remedy this I did two things. 1) I compared both "\wamp\bin\apache\apache2.4.9\conf\httpd.conf" and "C:\wamp\bin\apache\apache2.4.9\conf\original\httpd.conf" and made sure any module load instruction that is active in one is also active in the other. (If the "original" directory is just for backup then a better strategy would be just to make sure that all the module load statements instructed by the video to be uncommented were in fact uncommented in "\wamp\bin\apache\apache2.4.9\conf\httpd.conf" only.) 2) I also noticed that near the top of the httpd-ssl.conf files is the instruction

# Required modules: mod_log_config, mod_setenvif, mod_ssl,
# socache_shmcb_module (for default value of SSLSessionCache)

So in addition I ensured that these modules were being loaded in both httpd.conf files. When I couldnt find the load instruction in one file, I looked it up in the other. This fixed the problem after a "Restart All Services" and putting WAMPServer online again. Hope this helps other newbies.

Options: ReplyQuote
Re: SSL in WAMP
Posted by: RiggsFolly (---.as43234.net)
Date: December 29, 2015 01:03PM

Just for future reference these are the correct files

"\wamp\bin\apache\apache2.4.9\conf\httpd.conf"
and
"\wamp\bin\apache\apache2.4.9\conf\extra\httpd-ssl.conf"

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.