How to SSL local domain chrome

Hi, I try to create SSL certificate for server in local network .
Computer’s name is comp1
Domain’s name is dom1.local
One thing I do not understand:
Typing just name in browser is fine, one can reach the server.
Typing comp1.dom1.local yields host unreachable.
The question: which name use as common name while creating certificates?
I know that cert should be max 1 year valid but I still get:
NET::ERR_CERT_COMMON_NAME_INVALID
when going to the server with cert installed in the browser as root authority.
Hier is command line I use to create the cert:

OpenSSL req -newley rsa:2048 -nodes -keyout dom.key -x509 -days 365 -out dom.crt

Any hints?

NET::ERR_CERT_COMMON_NAME_INVALID

dom may be a protected filename?..
try renaming it id_rsa for user keys.
then chmod it with the right privs.

also your host is listed in your hosts file as ?
127.0.0.1 dom1 comp1.dom1

you may want to rout ::1 and local to 127.0.0.1 also.
127.0.0.1 ::1
127.0.0.1 localhost

Hmmm, afaik this means that “common name” that certificate has, that the server served does not match the Host name that browser requested. They need to look exactly the same - there’s no automatic domain-y searchintans guessing or short name expansion being done.

IME, using FQDN in the cert and FQDN in the browser is the least headache-y option.

So, comp1.dom1.local in /etc/hosts, in cert, and in your http config.

The root SSL certificate can now be used to issue a certificate specifically for your local development environment located at localhost . Create a new OpenSSL configuration file server.