Wildcard SSL and Wildcard hostnames

braindeaf nginx-forum at nginx.us
Mon May 11 11:11:34 UTC 2015

Hey there, I'm struggling to find the correct answer and unsure if there
even is one.

We have a domain say, example.co and we've purchased a wildcard SSL
certificate for it. We want to be able to provide what amounts to....with
minimal configuration.


all pointing at the same server so something like

server {
  port 443
  server_name example.co *.example.co;

  ssl on;
  ssl_protocols .....;
  ssl_ciphers .....;
  ssl_prefer_server_ciphers on;
  ssl_certificate /data/nginx/ssl/example.co.crt;
  ssl_certificate_key /data/nginx/ssl/example.co.key;

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? I've seen examples
of using the same ssl key for different virtual servers with different
hostnames but not pointing to the same one.

Anyone else have any joy with a similar config?


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,258792,258792#msg-258792

More information about the nginx mailing list