在根目录 "/" 下的laravel项目文件能运行,其他文件夹下会显示No input file specified
运行环境
centos7 + lnmp
laravel版本
laravel 8.18.1
问题描述
在 “/home/user” 下新建了一个laravel项目 blog,配置好域名www.blogaaa.com, 登录界面上显示No input file specified。
将项目文件复制到根目录 “/“ 下,重新修改nginx配置文件定位到根目录的 “/blog/public”下,项目能正常运行,如图所示
百度搜索,可能是项目无法访问根目录之外的文件,但是不知道如何解决。
关于 LearnKu
nginx.conf应该还要配置下:
location / { try_files $uri $uri/ /index.php?$query_string; index index.php index.html index.htm; }另外还有一些文件目录权限vendor、storage755nginx 配置文件有问题,去看nginx日志 初步猜测是 这里的问题
.user.ini可能是这个文件造成的重写文件配置问题