From this answer, I created:
C:\wamp\bin\apache\apache2.4.9\ssl.crt\vhost.crt
&
C:\wamp\bin\apache\apache2.4.9\ssl.key\vhost.key
I edited:
C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-ssl
to include:
<VirtualHost www.vhost.dev:443>
DocumentRoot "c:/wamp/www/vhostdev"
ServerName www.vhost.dev:443
ErrorLog "c:/wamp/logs/ssl_error.log"
TransferLog "c:/wamp/logs/ssl_error.log"
SSLEngine on
SSLCertificateFile "c:/wamp/bin/apache/apache2.4.9/conf/ssl.crt/vhost.crt"
SSLCertificateKeyFile "c:/wamp/bin/apache/apache2.4.9/conf/ssl.key/vhost.key"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "c:/wamp/www/vhostdev">
SSLOptions +StdEnvVars
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "c:/wamp/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
The SSL Apache module is turned on.
www.vhost.dev is defined in the Windows host file correctly.
When I load https://www.vhost.dev, I receive:
This site can’t be reached
www.vhost.dev refused to connect.
Try:
Reloading the page
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
There is nothing in C:\wamp\logs\apache_error.txt
There is nothing in Windows Event Viewer > Application
.
Help appreciated.
Update: I created a 2nd .crt
& .key
for a 2nd vhost and the problem followed me when I tried to load the 2nd vhost over https
. This problem has only existed since I reinstalled Windows from fresh.
Update 2: After running netsh int ipv4 install
in Windows cmd
, the error has changed to:
This site can’t provide a secure connection.
ERR_SSL_PROTOCOL_ERROR
Update 3: In another browser, Firefox, the error is different:
An error occurred during a connection to www.vhost.dev. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
Update4: SSL_ERROR_RX_RECORD_TOO_LONG has a solution here but none of the solutions in the answer or answer comments applied.
Update 5: I upgraded from WAMPServer 2.5 to WAMPServer 3, and the issue remains.
Update 6: I had found that I had keys and certificates referenced in <VirtualHost>
entries in httpd-ssl.conf
that were not present in C:\wamp\bin\apache\apache2.4.9\conf\ssl.crt
or C:\wamp\bin\apache\apache2.4.9\conf\ssl.key
.
These <VirtualHost>
entries were from my previous Windows 10 installation.
I commented out the erroneous entries, so that the only <VirtualHost>
entries left are those that have valid .crt
and .key
files. However, the same error SSL_ERROR_RX_RECORD_TOO_LONG
remains in Firefox.