server {
listen 80; ## listen for ipv4; this line is default and implied
root /Users/andyhuang/Public/website/src/www-admin;
index index.html index.htm index.php index02.html;
# Make site accessible from http://localhost/
server_name admin.archist.cn;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.html /index.php?$query_string;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
include /usr/local/etc/nginx/conf.d/php-fpm;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
deny all;
}
error_page 404 /404.html;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
#fastcgi_pass 127.0.0.1:9000;
#fastcgi_index index.php;
#include /usr/local/etc/nginx/fastcgi_params;
#fastcgi_param SCRIPT_FILENAME /usr/local/Cellar/#nginx/1.8.0/html$fastcgi_script_name;
}
}
转载请注明原文地址: https://ju.6miu.com/read-1309471.html