multiple ssl certificates within single server {} block
Richard Kearsley
richard at kearsley.me
Tue Nov 5 13:30:38 UTC 2013
Hi
I was wondering if there's any way to have a configuration like this?
server
{
listen 80;
listen 443 ssl;
ssl_certificate www.example.com.cer;
ssl_certificate_key www.example.com.key;
ssl_certificate www.test.com.cer;
ssl_certificate_key www.test.com.key;
ssl_certificate www.something.com.cer;
ssl_certificate_key www.something.com.key;
location /
{
# lots of config here
# which I really don't want to duplicate
}
}
I want to avoid duplicating server blocks since they will have exactly
the same location configurations below them
and I want to avoid using server_name since my server handles requests
from lots of different domain names
It would need to use SNI - only a single ip for all domains
maybe having the server name as part of the "ssl_certificate" line would
be quite elegant:
ssl_certificate www.example.com.cer server=www.example.com;
ssl_certificate_key www.example.com.key server=www.example.com;
Thanks
--
Richard
More information about the nginx
mailing list