Wildcard SSL and Wildcard hostnames

Reinis Rozitis r at roze.lv
Mon May 11 11:37:27 UTC 2015


> This doesn't appear to work as I would expect it to. Would we need to set 
> up
a different server for each subdomain explicity. or could we get away with
one config for example.co and another for *.example.co?

Doesn't work in what way?  (Does nginx or browser complain/what's the 
error?)


Such configuration is perfectly fine, unless you allready have a server {} 
block for each subdomain then you need to repeat the ssl config for each 
one.

The other caveat I can think of would be if the wildcard *.example.co 
certificate doesn't contain Subject Alternate Name for  'example.co' (exact 
domain without prefix). It depends on CA who issued the certificate - 
usually they include the bare domain too but I have seen also different 
cases.

rr 



More information about the nginx mailing list