zoukankan      html  css  js  c++  java
  • nginx解析php请求为404

    刚搭建了lnmp环境,发现如果讲我的程序放在某个文件夹的时候,然后nginx进行代理的时候竟然会是404;

    nginx配置如下:

       # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            #
            location ~ .php$ {
                root           /home/morequ/morequ-wordpress;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  info.php;
                fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }

    但是怎么请求都是404,

    后来发现是liunx权限的问题,发现我的nginx是root用户启动的,但是没有读取morequ的权限

    赋权即可:

    # chomd 777 /home/morequ
    # chomd 777 /home/morequ/morequ-wordpress
  • 相关阅读:
    Logstash
    收藏学习Linux好用的网站
    Elasticsearch
    Elasticsearch-head
    Kibana
    Metricbeat
    filebeat
    elelelleeleELK
    MySQL对库的操作
    【Django】URL控制器
  • 原文地址:https://www.cnblogs.com/lic309/p/4831966.html
Copyright © 2011-2022 走看看