I am setting up an apache developement environment on my computer. I want to work with virtual hosts and HTTPS, so I set up vhosts and SSL certificates with openssl as well.
Everything works fine, but I want to get rid of the security warning in chrome. After some googling I found out that setting the allow-insecure-localhost flag might get me closer to the solution.
After I set it, the https://localhost address worked fine without the warning, but when I'm trying to open a virtual host (let's say: https://www.example.com), chrome always throws me the warning message:
ERR_CERT_COMMON_NAME_INVALID
I am using Apache/2.4.29 on a High Sierra MacOS. I have separate certificates for the different vhosts, and on apache startup the log tells me
AH02043: SSL virtual host for servername example.com found
So my question is, how to get rid of the chrome insecurity warnings on a local environment when I want to use secure vhosts?