multiple ssl certificates within single server {} block

Tim Düsterhus timwolla at bastelstu.be
Tue Nov 5 16:59:26 UTC 2013


On 05.11.2013 17:51, Richard Kearsley wrote:
> would it work like this (an include in an include?)

Did you try it? ;)

Yes it does work. Debian by default uses a folder
/etc/nginx/sites-enabled for all vHosts / domains. You can easily
include any file in there via:

    include /etc/nginx/sites-enabled/*;

An excerpt of my /etc/nginx looks like this:

/etc/nginx/
+-- common.conf
+-- nginx.conf
+-- passwd
|   +-- munin.example.com
+-- sites-available
|   +-- _
|   +-- example.com
|   +-- localhost
|   +-- munin.example.com
+-- sites-enabled
|   +-- _ -> /etc/nginx/sites-available/_
|   +-- example.com -> /etc/nginx/sites-available/example.com
|   +-- localhost -> /etc/nginx/sites-available/localhost
|   +-- munin.example.com -> /etc/nginx/sites-available/munin.example.com
+-- ssl
|   +-- _
|   +-- com.example.crt
|   +-- com.example.munin.crt
+-- ssl-common.conf

nginx.conf includes all the sites-enabled via the line above. The
sites-enabled include the respective common.conf / ssl-common.conf like
explained in my last mail.

Tim



More information about the nginx mailing list