I've created a self-signed certificate for use on my Windows 10 development machine and I've added it to the Trusted Root Certification Authorities/Certificates as advised by How to install an Apache Self Signed Certificate on Windows 10 on YouTube. I can see the certificate has been installed by using certmgr.msc
.
When I go to the HTTPS address in Edge (the browser used in the video), I get the following error message by clicking on Details
:
The hostname in the website’s security certificate differs from the website you are trying to visit.
Error Code: DLG_FLAGS_SEC_CERT_CN_INVALID
Firefox says:
dev.hmr-app uses an invalid security certificate.
The certificate is not trusted because it is self-signed.
The certificate is not valid for the name dev.hmr-app.Error code: SEC_ERROR_UNKNOWN_ISSUER
and
Peer's Certificate issuer is not recognised.
HTTP Strict Transport Security: false
HTTP Public Key Pinning: false
[Certificate chain removed]
I get a similar message in all other browsers. While I can manually create an exception for each browser, I'd prefer to have it just work in all of them as if I was browsing a real site.
I've double and triple checked the certificate, and the address is exactly the same as the one I'm using to access the local development site.
The relevant bits of my httpd-vhosts.conf
are as follows:
<VirtualHost *:443> ServerName dev.hmr-app ErrorLog "logs/dev.hmr-app-error.log" CustomLog "logs/dev.hmr-app-access.log" common SSLEngine on SSLCertificateFile "C:/server/Apache24/conf/server.crt" SSLCertificateKeyFile "C:/server/Apache24/conf/server.key"
How can I get this to work?