Is it possible to use single self-signed certificate for all local domains, like: blog1.test, shop1.test, shop2.test, so i don't have to add all of these certificates to my Keychain (MacOS), instead i'd like to add just one generic self signed certificate?
Here's my /etc/ssl/openssl.cnf config:
[ san ] subjectAltName = @alt_names [ alt_names ] DNS.1 = localhost DNS.2 = domain.test
I generated my self-signed cert this way:
sudo openssl req -extensions san -config /etc/ssl/openssl.cnf -x509 -nodes -newkey rsa:4096 -keyout /private/etc/apache2/server.key -out /private/etc/apache2/server.crt -days 3650 -subj "/C=KZ/ST=Almaty/L=Almaty/O=Companyname/CN=localhost"
But even if i add to SAN more DNS records, it won't work on different domain than "localhost". Is this even possible?