访问LNMP虚拟主机出现报错:No input file specified.

以前一直是使用lnmp一键包,可是访问建立的虚拟主机,并无出现过的错误:No input file specified.html

网上的文章不少,可是都是转载,并且缘由也不少,根本不适用nginx

后面在lnmp一键包官网找到解决方案:https://lnmp.org/faq/lnmp-vhost-add-howto.html3d

这是“防跨目录设置”致使的问题,根据文档,作出修改:code

# vi  /usr/local/nginx/conf/fastcgi.conf 

找到:fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; 在该行行前添加 #,htm

删除public目录下.user.ini文件blog

# chattr -i   path to/public/.user.ini
# rm   -rf    path to/public/.user.ini

我电脑安装双系统(win+deepin),这个项目文件在Windows ntfs文件系统磁盘下, chattr -i path to/public/.user.ini 报错:chattr: 无效的参数 while reading flags on .user.inici

发现不能直接解锁文件,网上帖子说chattr只能用于ext文件系统,因而我在这个命令chattr -i path to/public/.user.ini 加上“-f”:chattr -f -i path to/public/.user.ini ,试了一下,竟然成功解锁文件了!lnmp

重启nginx,问题解决文档

相关文章
相关标签/搜索