multiple ssl certificates within single server {} block

Jonathan Matthews contact at jpluscplusm.com
Tue Nov 5 13:50:48 UTC 2013


On 5 November 2013 13:30, Richard Kearsley <richard at kearsley.me> wrote:
> 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

How are you intending to use SNI /without/ also providing multiple
server_names (either split across several server{}s or all inside one
server{})?

Please show a duplicated (i.e. operationally inefficient) config that
you wish to aggregate, as I don't understand the result you're aiming
for.

J



More information about the nginx mailing list