I haven found a answer to the question from 2013 but is this answer still valid with SNI.
SSL wildcard certificates and trailing 'www'
Is it possible to have a certificate or SAN with www.*.domain.com which works with current Browsers?
example:
plain www.subdomain1.domain.com/ => secure www.subdomain1.domain.com/ plain www.subdomain2.domain.com/ => secure www.subdomain2.domain.com/
I know how to configure nginx to accept the domain but I'm not sure if the browser accept the certificates.
Many thanks for answers.