server {
listen 8992;
server_name localhost;
location / { #此处填根目录
index index.php index.html index.htm;
root /usr/local/nginx/html/zabbix; #配置访问的路径
}
location ~ \.php$ {
root /usr/local/nginx/html/zabbix; #配置访问的路径
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
两个路径正常
原文:http://blog.51cto.com/yht1990/2140980