Personally, I am using domain mapping and SSL and doing exactly as Rahul suggested: one file (server) per domain my ee site configuration simply looks like:
#server configuration moved to 'conf' folder to use templates
include /var/www/example.com/conf/nginx/*.conf;
Then for each domain, for example, example.net
I do:
server {
listen 80;
listen 443 ssl spdy;
server_name www.example.net example.net;
ssl_certificate /var/www/example.com/conf/certs/example.net.crt;
ssl_certificate_key /var/www/example.com/conf/certs/private/example.net.key;
# Uncomment the following line for domain mapping
server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;
index index.php index.html index.htm;
# Redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
include common/php-hhvm.conf;
include common/wpcommon.conf;
include common/locations.conf;
#include custom server configurations (such as subdirectory installs)
include /var/www/example.com/conf/nginx/example.net.config*;
}
or similar, according to your desired ee configuration…
Of course, you also have place all the keys and certificates in the ./conf/certs
folder, etc.
I hope it helps.