I have the VirtualHost directives in the webserver config files in the following format:
<VirtualHost *:443> ServerName example.com
https://example.com to the browser renders the site correctly, traffic is TLS encrypted. As soon as I rewrite it to
Firing a GET request to the domain on port 443 results in an SSL error, namely
NET::ERR_CERT_COMMON_NAME_INVALID in Chrome, which says, that the webserver provided a certificate that is valid for
example.net (this other domain is still hosted on my server).
If I look into the cert (
openssl x509 -in cert.pem -text), I get that it's issued for
The path to the cert is correctly configured.
Additional info: Both domains resolve to the same 127.0.0.1 in the hosts file, NameVirtualHost is not set, and there is a proxy in front of the webserver, which hopefully has nothing to do with this issue.