I am setting up applications on multiple subdomains on the same server - subdomain1.abc.def.com, subdomain2.abc.def.com and such. My applications are containers. I have setup a reverse proxy on my server using nginx-proxy. The server hostname is xyz.abc.def.com.
I am able to access the subdomains successfully using http. I then generated SSL certificates for both subdomains (subdomain1.abc.def.com.crt and subdomain1.abc.def.com.key; subdomain2.abc.def.com.crt and subdomain2.abc.def.com.key), and placed it under certs folder as described in nginx-proxy.
When I tried to access one of the subdomains - subdomain2.abc.def.com, the browser complains saying "the certificate name does not match input".
I have both the Common Name and SAN set to the same domain name - for e.g., the SSL certificate for subdomain1.abc.def.com has both Common Name and SAN set to subdomain1.abc.def.com.
The webserver - nginx has SNI enabled.
What am I missing in my configuration?