JLBN – Setup HTTPS SSL on WAMP
Hypertext Transfer Protocol over Secure Socket Layer or HTTPS is a URI scheme used to indicate a secure HTTP connection. It is syntactically identical to the http:// scheme normally used for accessing resources using HTTP. Using an https: URL indicates that HTTP is to be used, but with a different default TCP port (443) and an additional encryption/authentication layer between the HTTP and TCP. This system was designed by Netscape Communications Corporation to provide authentication and encrypted communication and is widely used on the World Wide Web for security-sensitive communication such as payment transactions and corporate information systems.
In this tutor guide for WAMP, we will show you how to create a self-signed HTTPS SSL certificate; then, how to implement this self-signed certificate into WAMP; then, obtain a FREE Trusted HTTPS SSL Certificate to replace the self-signed one.
Following your steps completely killed my wamp server. Forced to reinstall.
U missed an step
Remove # from below line in httpd.conf
#LoadModule ssl_module modules/mod_ssl.so
thats y when we try to enable ssl module for apache it gives internal error
step 3, I wrote the command as shown, but I recieve the following massage:
Loading ‘screen’ into radon state – done
Generating RSA private key, 2048 bit long modulus
……………………………………………………….+++
………………….+++
unable to write ‘random state’
e is 65537 (0x10001)
Enter pass phrase for pass.key:
why do I get this “unable to write ‘random state'” massage and how should I react ?
thanks
PS : I also downloaded http-ssl.conf and edit it well unfortunately APACHE Server not start
I am no speaking englsih very well but I will try to explain my problem. I tried to setup SSL on my WAMP following the tutorial step by step but when I enable the SSL_MODULE on apache, the APACHE Server can’t start again I”m using Apache 2.2.6 please help me.
hi, please help me with some stuff cause i’m desperate:( i followed the steps(thank’s a lot for that), and i cannot enable the php openssl…i’ve tried to modify the php.ini to make it work but for nothing…my icon stays yellow too (sorry for my english) i could use an answer please:d
In what step did you get stuck?
When I attempted step 3 to generate the self signed certificate, it gave me an error:
“Verify failure
User interface error”
Any ideas?
Thank you!
AT, did you download and install our WampSSL before setting up SSL?
Okay if i enter https://localhost/test.html it works. Also i had this question . Why dont i have to type in https://localhost/ssl/test.html. How does it automatically recognize that when it is https the default folder is ssl in the www directory.
When you define a folder in VH, it becomes the root directory and you don’t have to type the name of the folder.
For example:
<VirtualHost *:80>
…
ServerName http://www.your_domain.com
DocumentRoot C:/wamp/www/your_domain
…
</VirtualHost>
It becomes: http://www.your_domain.com and will show the content in C:/wamp/www/your_domain folder
Another example:
<VirtualHost *:80>
…
ServerName your_local_domain
DocumentRoot C:/wamp/www/your_local_domain
…
</VirtualHost>
And it becomes: http://your_local_domain and will show the content in C:/wamp/www/your_local_domain folder
Note that VH can be defined in httpd.conf, httpd-vhosts.conf, or httpd-ssl.conf …
Wow , That simplifies things. Thanks a lot . Also just something that you should know – http://www.cacert.org itself does not have a valid certificate. Every time i try to access it it says certificate error.
Hi,
I downloaded your httpd-ssl.conf and edited the apache version. I also replaced the capital a which was metioned as a problem in the comments. But when i try to start the ssl_module it says the service cannot be started. There are no files(conf,ini) outside my wamp folder. I have no clue what i am doing wrong. Also i am unable to see any logs. Which is the log i have to look at to see what the issue is.Is it the apache error log or some other log. Cause there is no error in my aopache error log.
Sab, the error log file for SSL is not in the regular place but in the location that you’ve defined in httpd-ssl.conf file. In the mean time, you might want to post your detail issue here so people can help if they ever encountered the same error π
Finally figured it out. If i got to the httpd.conf and remove the comment manually it seems to work(That is the wamp server becomes green. But if i go to my browser and type in https://myname it says the server is taking too long to respond . Any ideas
Hey Sab, please explain how you solved this. Which comment have you removed from which file exactly?…
I’m also stuck there, as many others will. I also tried jlbn’s httpd-ssl.conf file. nothing worked. π
In my Apache2.2.17/conf/httpd.conf file, I left this line uncommented:
LoadModule ssl_module modules/mod_ssl.so
And, as jlbn’s tutorial has instructed, uncommented this line:
Include conf/extra/httpd-ssl.conf
But still, WAMP refuses to start… (yellow) and naturally I can’t enable the php_openssl extension.
When I uncomment in httpd.conf the line “Include conf/extra/httpd-ssl.conf”, wamp refuses to start services and shows a brown icon.
(btw, when I commented it, I could start the wamp server and enable the php’s php_openssl extension. Not sure it was a good idea, but that’s what I did for now)
What am I doing wrong? Any guesses? I still can’t uncomment the “Include conf/extra/httpd-ssl.conf” …
This tutorial is absolute awesomeness! It’s detailed to the bones and IT WORKS!!!!!!!!!!!
It took me 8 hours to activate https on CentOS4 with EasyPHP and 15 minute with WAMP!!
THANKS!!! I love you! π
Thank you soooo much for this easy step-by-step guide to the protected World of SSL π
You made super good work guys!
Just want to warn everybody, there is a tricky nuances about the SSL configuring:
1) You can get such an error in undermeaning conditions: “[warn] RSA server certificate CommonName (CN) `CertOwner’ does NOT match server name!?” or “[warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)”
If you make such mistakes – browser can tell you certificate is wrong.
2) If you have x64 Windows – you’ll have to recover and put original files openssl.exe libeay32.dll ssleay32.dll into Apache/bin folder and into windows/system32 folder before turning ssl plugins on. These files should been saved upon Wamp installation.
JL, where can I download the httpd-ssl.conf file?
I get the same error with wamp turning yellow and getting:
βCould not execute menu item (internal error) [Exception] Could not perform service action: The service has not been startedβ
I triple checked the commands dunno, using windows 7 x64.
bogzy,
click here to download the file and make sure to edit to correct Apache version
From where I could download your file httpd-ssl.conf ?
i can not make it run ! what wrong ?
i am running wamp Version 2.1 with
Apache Version : 2.2.17
PHP Version : 5.2.11
it worked fine till step 9 but on step 10 it gave this error
D:\wamp\bin\apache\Apache2.2.17\bin>openssl req -new -x509 -nodes -sha1 -key JLB
N.key -out JLBN.crt -days 999 -config d:\wamp\bin\apache\Apache2.2.17\conf\opens
sl.cnf
error on line -1 of d:\wamp\bin\apache\Apache2.2.17\conf\openssl.cnf
2584:error:02001002:system library:fopen:No such file or directory:.\crypto\bio\
bss_file.c:126:fopen(‘d:\wamp\bin\apache\Apache2.2.17\conf\openssl.cnf’,’rb’)
2584:error:2006D080:BIO routines:BIO_new_file:no such file:.\crypto\bio\bss_file
.c:129:
2584:error:0E078072:configuration file routines:DEF_LOAD:no such file:.\crypto\c
onf\conf_def.c:197:
what could be the issue?
thanks
sorry, it was typo π openssl.cnf should be opens
sl.conf
Still not working
Jose, if you don’t post the detail, nobody is able to help you out
I have followed your guide step by step but whenever I start WAMP 2.1 (Apache 2.2.17, PHP 5.3.4) it does not start it stays in the orange state and it gives me an error when I try to put WAMP online (it never did before) it says “Could not execute menu item (internal error) [Exception] Could not perform service action: The service has not been started”
Thanks for any help!!!
Tom, search and delete any my.ini, my.cnf, my.conf, or php.ini file outside wamp folder
JL, thx for your reply, but I checked and there wasn’t any outside the wamp folder, I only found one my.ini inside mysql folder.
The my.cnf and my.conf there wasn’t any on the system.
With regards php.ini I found a few files, some inside their own folders as I have several ongoing projects which I am testing (joomla site, WP site and Opencart site) but there are these two that I find weird (not sure if they should be there….one is C:\wamp\bin\apache\Apache2.2.17\bin and the other is C:\wamp\bin\php\php5.3.4. other than those, there aren’t any outside the wamp folder.
I appreciate the help as I am desperate to make this work so I could test the SSL in one of my projects before going “live”.
Tom, due to the limit width of the webpage, some lines of script in our guide might show as 2 lines but it actually just 1 line; thus, go over all the config files that you’ve edited to make sure those lines you’ve added is just one line, not 2. In additions, make sure it does not have blank space in front or in the end of the line, or easier, just download and use our httpd-ssl.conf file π
its for every webpage
Sirene, does it happen with any browser? Anyway, make sure to add your Domain Name and IP address in hosts file as instructed in Setup Virtual Hosts guide. If using Firefox browser, remember to configure Firefox as a web proxy client by telling it to use TMG as its proxy server.
I get this error when I try accessing my site through ssl
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
Sirene, is it just one particular page or any page will generate same error?
When trying to enable ssl module in apache, I get the following error message:
Could not execute menu item (internal error)[Exception] could not perform service action: The service has not been started
I have followed the instructions to the letter, only changing my Apache version from 2.2.8 as you have to 2.2.11.
Thanks for the help.
jim, post the last 10 lines of error log, please.
I am using wamp 2.2.21. I have a trouble when i tick the PHP Extension->php_openssl, it write “could not execute menu item (internal error) [Exception] Could not perform service action: The service has not been started”.
What’s wrong? and my wampserver turn yellow from green.
Michael, make sure to have the correct lines of codes in file httpd-ssl.conf or just simply download our httpd-ssl.conf file
JL, from where I could download your file httpd-ssl.conf ?