当前位置:首页 > 服务器技术 > nginx

nginx无法访问php

nginx无法访问php - 文章图片

nginx配置中,关于php的配置有错会导致nginx无法访问php。

找不到访问php找不到文件,修改下面配置

nginx.conf:

nginx无法访问php - 文章图片

location ~ .php$ {
        proxy_pass   http://127.0.0.1:80;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
        #fastcgi_param SCRIPT_FILENAME /$document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html$fastcgi_script_name;
        include        fastcgi_params;
    }

以上就是nginx无法访问php的详细内容,更多请关注Gxl网其它相关文章!


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!