Created
April 17, 2013 08:26
-
-
Save jianingy/5402680 to your computer and use it in GitHub Desktop.
dyanmic virtualhost for nginx
This file contains 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 default; | |
listen [::]:80 default; | |
server_name _; | |
charset utf-8; | |
access_log off; | |
root /var/www/$http_host/wwwroot/; | |
location / { | |
index index.html index.htm index.php; | |
} | |
error_page 404 /404.html; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_pass 127.0.0.1:65534; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment