Hi,
I have created 2 certificates for my 2 sub domains. I have tested them on ssllabs and get an A rating for both. I am using Nginx to proxy_pass to the ports where I have the apps running. I keep getting NET::ERR_CERT_COMMON_NAME_INVALID. I have been searching for a solution on the web and haven’t found the answer yet.
It all works fine with http.
Here is my Nginx conf
server {
server_name sub1.mydomain.com.au;
listen 80;
return 301 https://www.sub1.mydomain.com.au$request_uri;
}
server {
server_name www.sub1.mydomain.com.au;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/sub1.mydomain.com.au/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sub1.mydomain.com.au/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location /{
proxy_pass "http://127.0.0.1:64002";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass_request_headers on;
}
}
server {
server_name sub2.mydomain.com.au;
listen 80;
return 301 https://www.sub2.mydomain.com.au$request_uri;
location /{
proxy_pass "http://127.0.0.1:64001";
}
}
server {
server_name www.sub2.mydomain.com.au;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/sub2.mydomain.com.au/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sub2.mydomain.com.au/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location /{
proxy_pass "http://127.0.0.1:64001";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass_request_headers on;
}
}