在ngixn不解析php文件.需要配置下面

来源:互联网 发布:淘宝刷单怎么找商家 编辑:程序博客网 时间:2024/05/23 11:45

location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

注意需要把这段内容前面的注释符号去掉.而且注意这边我替换的$document_root.也可以用项目路径替换.推荐写成变量.