网站配置laravel ,经常出现No input file specified,重启nginx 正常
网站配置 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_passunix:/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;
} 不清楚具体原因
目前都不是lnmp的配置文件,要启用pathinfo的话都已经提供了配置文件和设置方法
而且laravel好像是需要跨目录访问
可以查查上面说的这2个
页:
[1]