VPS侦探论坛

 找回密码
 注册
查看: 3584|回复: 1

网站配置laravel ,经常出现No input file specified,重启nginx 正常

[复制链接]
发表于 2017-8-11 20:59:23 | 显示全部楼层 |阅读模式

网站配置 laravel 之后,大部分时候能正常访问,但是经常出现No input file specified,重启Nginx之后,问题页面正常访问,之后又会经常出现

请问,具体怎么处理?

配置文件如下

test.local.com



server
    {
        listen 80;
        #listen [::]:80;
        server_name test.local.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /mnt/hgfs/www/niu.local.com/default/public;

        include laravel.conf;
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*.php$ { deny all; }


        #include enable-php.conf;

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

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

        location ~ /.well-known {
            allow all;
        }

        location ~ /.ht
        {
            deny all;
            #allow all;
        }

        access_log  /home/wwwlogs/niu.local.com.log;
    }



laravel.conf


location / {
        try_files $uri $uri/ /index.php?$query_string;
}



location ~ .php$ {

        fastcgi_split_path_info ^(.+.php)(/.+)$;
        fastcgi_pass  unix:/tmp/php-cgi.sock;
        fastcgi_index index.php;
        #fastcgi_split_path_info ^(.+.php)(/.+)$;

        #fastcgi_param PATH_INFO    $fastcgi_path_info;
        #fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;


}
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-8-12 13:07:27 | 显示全部楼层


不清楚具体原因
目前都不是lnmp的配置文件,要启用pathinfo的话都已经提供了配置文件和设置方法
而且laravel好像是需要跨目录访问
可以查查上面说的这2个
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-25 15:25 , Processed in 0.025017 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表