My ngnix.conf file is as shown below.. I am trying to hit www.example.com in browser, then the url is getting hit is like https://www.www.example.com// and this gives me en error. Also the url https://example.com is not working.
server {
#server_names_hash_bucket_size 64;
listen 80;
server_name *.example.com www.example.com example.com;
server_tokens off;
# Redirects http to https
location / {
#return 301 https://$host$request_uri;
#non www to www
rewrite ^(.*) https://www.$host$request_uri$1 permanent;
}
The error is like -
Your connection is not private Attackers might be trying to steal your information from example.com (for example, passwords, messages or credit cards). Learn moreNET::ERR_CERT_COMMON_NAME_INVALID
Note - My certificate is not expired yet..