I have created self signed certificate localhost in windows 10 using OPENSSL Running on Nginx, If i hit https://localhost certificate shows valid but , if i hit ip address https://1.1.1.1 certificate shows invalid.
NET::ERR_CERT_COMMON_NAME_INVALID this server couldn't prove that it's 1.1.1.1; its security certificate is from localhost. This may be caused by a misconfiguration or an attacker intercepting your connection.