zoukankan      html  css  js  c++  java
  • nginx File not found 错误

    nginx配置php老是出错,浏览器打开php脚本报File not found 错误,最后才发现是$document_root的设置问题。
     
                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;
            }
     
    这个用出现找不到php的错误。因为$document_root 的参数是由root html那一行定义的,默认是在/etc/nginx/html/ 所以把 html换成站点根目录就正常了。
     
                location ~ .php$ {
                root           /usr/share/nginx/html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }
  • 相关阅读:
    UIImageView变灰
    IOS 瀑布流
    IOS9适配 MARK
    MAC PHP MARK
    IOS第三方库 MARK
    IOS聊天对话界面
    UILabel自适应宽度的函数详解
    UIControl的使用
    IOS @2X.png
    自定义UIAlertView
  • 原文地址:https://www.cnblogs.com/moqiang02/p/4061145.html
Copyright © 2011-2022 走看看