same config for two virtual hosts (except hostname / certificate)

Gelonida N gelonida at
Wed Nov 23 22:23:50 UTC 2011


I'm still a little shaky with how to best structure my nginx
configurations and where one can / should use includes and where one

somehow I like the idea of a directory structure like

/etc/nginx/  # for basic files / certificates / . . .
/etc/nginx/sites-available # the available configs
/etc/nginx/sites-enabled  # the sites, that shall really be started

Now I have two sites (ssl which should share exactly the same config
(except the host name and the server certificate)
the first one would be for example
the other

Of course both would need their own certificate and host name.

What would be the recommended way for such a setup?

thanks in advance for any feedback

More information about the nginx mailing list