laravel 5.3在nginx下提示“No input file specified.”

我已经将root目录设置成了public目录,而且我也可以访问里面的静态文件,但是进入public目录就一直提示“No input file specified.”,求大神解答,下面是我的nginx的conf

server
{
    listen       80;
    server_name lirecord.licoy.cn; #server_name end
    index index.html index.htm index.php; #index end
    charset utf-8;
    
    root  /home/wwwroot/lirecord/web/public;

    #error_page
     location ~ /ErrorPages/(400|401|403|404|405|500|502|503)\.html$ {
                root /home/wwwroot/lirecord/web;
    }
    
    location / {  
        try_files $uri $uri/ /index.php?$query_string;  
    }    


    location ~ .*\.php$
    {
        fastcgi_pass  unix:/tmp/php-cgi-lirecord.sock;
        fastcgi_index index.php;
        include fcgi-host.conf;
        fastcgi_param DOCUMENT_ROOT  /web;
        fastcgi_param SCRIPT_FILENAME  /web$fastcgi_script_name;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp3|wma)$
    {
        expires      30d;
    }

    location ~ .*\.(js|css)$
    {
        expires      12h;
    }

    access_log off; #access_log end
    error_log /home/wwwroot/lirecord/log/error.log crit; #error_log end
}
阅读 11.1k
2 个回答
  1. 查看目录/home/wwwroot/lirecord/web/public其它用户是否可读可写?

  2. 是否生成的Application-key 可以执行php artisan key:generate;

fastcgi_param DOCUMENT_ROOT  /web;
fastcgi_param SCRIPT_FILENAME  /web$fastcgi_script_name;

感觉这两行代码有点不对劲。
删掉前面的,换成这个试试

fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
推荐问题