Posted by:
Christiane
(---.cable.dynamic.v4.ziggo.nl)
Hi Guys,
It concerns a localhost installation of a copy of a production site which uses SSL and a certificate. I wanted to reproduce this environment on my localhost and test a few things before proceeding to the changes on production.
Configuration: Wamp64 server 3.2.6 (PHP 7.4.26 Apache 2.4.51 MySQL 5.7.36) with WP 5.8.3
To test the SSL on my localhost, I did the following:
1. Installed OpenSSL on C:\Program Files\OpenSSL)
2. I executed C:\Program Files\OpenSSL-Win64\bin\opensll as administrator and created a private.key and a certificate.crt files
3. I copied these files into C:\wamp64\bin\apache\apache2.4.51\conf\key
Note \key is a new sub directory I created.
4. I configured the httpd.conf file by uncommenting the following modules:
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
5. I configured httpd-ssl.conf file
DocumentRoot “c:/wamp64/www/test-devriesjuwelier.nl”
ServerName localhost:443
ServerAdmin
admin@example.comI also added the path of the certicate and private key:
SSLCertificateKeyFile “${SRVROOT}/conf/key/private.key”
SSLCertificateFile “${SRVROOT}/conf/key/certificate.crt”
6. I configured the virtualhost in the http-vhosts.conf
<VirtualHost *:443>
ServerName test-devriesjuwelier.nl
DocumentRoot “c:/wamp64/www/test-devriesjuwelier.nl”
<Directory “c:/wamp64/www/test-devriesjuwelier.nl/”>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
SSLEngine on
SSLCertificateFile “${SRVROOT}/conf/key/certificate.crt”
SSLCertificateKeyFile “${SRVRoot}/conf/key/private.key”
</VirtualHost>
7. I restarted all services of Wampserver and saw this warning:
“There is a syntax error in Apache conf files. AH00526: Syntax error on line 157 of C:/wamp64/bin/apache/apache2.4.51/conf/extra/httpd-ssl.conf: SSLCertificateKeyFile: file ‘C:/wamp64/bin/apache/apache2.4.51/conf/private.key’ does not exist or is empty
However the file exists. See step 5 above. What strucks me in this message is that the path is not what I gave in http-vhosts.conf file.
8. When I still try to go to [
localhost] in my browser (with all previous cookies deleted), I get a ‘ERR_TOO_MANY_REDIRECTS” error.
I
f I look into the log of the apache server, I see this ssl-warning logged in: “… test-devriesjuwelier.nl:443:0 server certificate does NOT include an ID which matches the server name”
This must be something I missed somewhere, and it must be small. Can you help?