I have multiple virtual hosts on the same server using CentOS 6. After running sudo ./path/to/certbot-auto --apache
I have successfully installed a certificate for a website https://domain1.example
. Browser confirms that the certificate is issued to Common Name (CN) domain1.example
.
However, after repeating the same procedure for domain2.example
, browser is warning that the connection is not secure and the certificate is issued to Common Name 192.168.1.5
, which is a local IP address of the server. Why isn't the Common Name correctly determined for domain2.example
? What could be the reason?
Without https://
the website http://domain2.example
is working properly.