Created
March 18, 2016 03:50
-
-
Save wookiecooking/cad4404bba72b76df256 to your computer and use it in GitHub Desktop.
static nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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