On 05/11/13 16:27, Tim Düsterhus wrote:
This sounds like you want to use `include`, i use it myself for general
settings, valid for any domain:

fair point

would it work like this (an include in an include?)

http
{
    include www.example.com.conf;
    include www.test.com.conf;
    include www.something.com.conf;
}

www.example.com.conf:

    server
    {
        listen 80;
        listen 443 ssl;
        server_name www.example.com;

        ssl_certificate www.example.com.cer;
        ssl_certificate_key www.example.com.key;

        include locations.conf;
    }

www.test.com.conf:

server
    {
        listen 80;
        listen 443 ssl;
        server_name www.test.com;

        ssl_certificate www.test.com.cer;
        ssl_certificate_key www.test.com.key;

        include locations.conf;
    }

www.something.com.conf:


    server
    {
        listen 80;
        listen 443 ssl;
        server_name www.something.com;

        ssl_certificate www.something.com.cer;
        ssl_certificate_key www.something.com.key;

        include locations.conf;
    }

locations.conf:

        location /
        {
            # lots of config here
            # which I really don't want to duplicate
        }

        # and about 10 other locations!


_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to