Skip to content

Instantly share code, notes, and snippets.

@wookiecooking
Created March 18, 2016 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wookiecooking/cad4404bba72b76df256 to your computer and use it in GitHub Desktop.
Save wookiecooking/cad4404bba72b76df256 to your computer and use it in GitHub Desktop.
static nginx
server {
listen 80;
server_name ~^(www\.)?(?<sname>.+?)$;
root /var/www/html/$sname;
index index.html;
charset utf-8;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log /var/log/nginx/$sname-access.log;
error_log /var/log/nginx/$sname-error.log debug;
error_page 404 /404.html;
sendfile off;
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment