zoukankan      html  css  js  c++  java
  • archlinux 下 nignx + php 出现 no input file specified

    奇葩的问题,配置 nginx + php + mysql 后,加一个站点:

    server {
            listen       80;
            server_name  wei.abc.com;
            root /www/wei.abc.com/;
            index  index.html index.htm index.php;
    
    #       if (!-f $request_filename) {
    #               rewrite ^/(.*)$ /f.php last;
    #       }
    
            location / {
            }
    
            location ~ .php$ {
                root           /www/wei.abc.com;
                    fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
                    fastcgi_index index.php;
                    include fastcgi.conf;
            }
    }
    

     死活访问都是 no input file specified,打开 /etc/php/php-fpm.conf,找到 access_log 打开,access_format打开,发现文件路径也正确,配出 nginx 配置问题

    后发现 /etc/php.ini 中对 php 的路径做了限制:

    open_basedir 中巴网站路径加上即可,或者直接注释掉也行(安全起见,还是加一个目录比较好)。

  • 相关阅读:
    jq insertBefore 的返回值
    微信公众号-定位之地址逆解析&导航
    微信JS-SDK
    Vue
    ES6-函数的扩展
    ES6-数组的扩展
    JSP
    JS
    HTML+CSS
    jdbc操作数据库
  • 原文地址:https://www.cnblogs.com/shengshuai/p/4017525.html
Copyright © 2011-2022 走看看