legend3---用Homestead配置后报错“No input file specified.”
legend3---用Homestead配置后报错“No input file specified.”
一、总结
一句话总结:
自己项目上传到github的时候多增加了一层legend3的github目录,然后没有去修改Homestead.yaml,所以nginx找不到文件了
用 查看错误日志 的方法可以比较快的排查错误
1、No input file specified错误 出现的最可能的原因是什么?
No input file specified表示apache或者nginx没有找到文件,那么最有可能的原因就是配置的路径出错
2、用Homestead配置后报错“No input file specified.”的排错方向是什么?
肯定是apache服务器或者nginx服务器没找到文件,去看看apache或者 nginx的配置
3、排查错误比较好的方法是什么?
查看错误日志:nginx错误日志的位置 为:/var/log/nginx/
2019/09/10 18:42:03 [error] 1267#1267: *12 FastCGI sent in stderr: "Unable to open primary script: /home/vagrant/legend3/public/index.php (No such file or directory)" while reading response header from upstream, client: 192.168.10.1, server: legend3.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "legend3.com"
2019/09/10 18:42:05 [error] 1267#1267: *12 FastCGI sent in stderr: "Unable to open primary script: /home/vagrant/legend3/public/index.php (No such file or directory)" while reading response header from upstream, client: 192.168.10.1, server: legend3.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "legend3.com"
4、Homestead重启虚拟机指令?
vagrant reload
二、用Homestead配置laravel开发环境后网页报错“No input file specified.”
转自或参考:用Homestead配置laravel开发环境后网页报错“No input file specified.”
https://blog.csdn.net/haisley/article/details/82083203
用Homestead配置laravel开发环境后,打开项目网页报错“No input file specified”,没有指定输入文件。
查找原因,发现虚拟机nginx站点指定的文件夹是/home/vagrant/code/public,而我在Homestead目录下的Homestead.yaml文件里,sites指定的目录是/home/vagrant/Code/public,大小写不同导致路径不同了,所以站点指定目录code下其实是没有代码的,会报错。
所以我把Homestead.yaml文件里的站点修改成指定小写code目录就解决了这个报错。
下面是无意中发现这个细节错误的过程。
1、你安装的Homestead目录下,输入以下命令进入虚拟机(已经启动vagrant up):
vagrant ssh
2、查看nginx配置文件(/etc/nginx/sites-available/)
cd /etc/nginx/sites-available
用vim命令查看当前目录下的网站域名文件:
3、发现站点指定的路径是/home/vagrant/code/public,和我在Homestead.yaml配置的路径Code大写不同。
输入 :q!退出编辑。
输入exit退出虚拟机。
4、改正Homestead.yaml文件路径。
5、重启虚拟机
vagrant reload
6、再次打开项目网页就不报“No input file specified”这个错了。
可能有人需要这个教程《Homestead中第一个Laravel项目502 Bad Gateway》。
三、出错原因
自己项目上传到github的时候多增加了一层legend3的github目录,然后没有去修改Homestead.yaml,所以nginx找不到文件了


nginx错误日志内容:
2019/09/10 18:42:03 [error] 1267#1267: *12 FastCGI sent in stderr: "Unable to open primary script: /home/vagrant/legend3/public/index.php (No such file or directory)" while reading response header from upstream, client: 192.168.10.1, server: legend3.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "legend3.com"
2019/09/10 18:42:05 [error] 1267#1267: *12 FastCGI sent in stderr: "Unable to open primary script: /home/vagrant/legend3/public/index.php (No such file or directory)" while reading response header from upstream, client: 192.168.10.1, server: legend3.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "legend3.com"

legend3---用Homestead配置后报错“No input file specified.”的更多相关文章
- TP5使用路由模式报错 No input file specified.
热烈推荐:超多IT资源,尽在798资源网 application/route.php 是设置路由的文件. 将 route.php 代码修改为 <?php use think\Route; Ro ...
- tp5.1路由报错No input file specified.
问题: 按照官方教安装了框架,打开首页没问题,可是安装教程路由规则打开 "http://127.0.0.1/hello/2" 时, 却报错误 "No input fil ...
- apche配置后报错(Forbidden)没有权限
apche如何配置虚拟目录及虚拟目录的权限 <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow ...
- [解决方案]IIS配置后报错404,500,502等系列问题
很多时候刚部署完服务器的IIS以后,第一次部署站点都会出现形形色色,各种各样的报错问题,但这些问题大同小异,我这里就给大家提供的解决的方案,以达到以不变应万变的效果 目的:让大家学会处理类似问题的方法 ...
- [解決方案]IIS配置后报错500.21
如果报错这个信息,那么就是aspnet未注册造成的,需要安装一下 步骤: 1.打开CMD 2.输入cd %windir%\Microsoft.Net\Framework\v4.0.30319 3.执行 ...
- tp5项目报错no input file specified解决
关于这个问题众多解决方案 1.php版本问题>5.6,把php版本改成5.5版本 2.入口文件同级目录下的.htaccess文件 RewriteRule ^(.*)$ index.php/$1 ...
- Nginx+PHP “No input file specified”错误的解决办法
配置官网商城php网站时候,界面报错“No input file specified” 原理: 任何对.php文件的请求,都简单地交给php-cgi去处理,但没有验证该php文件是否存在. PHP文件 ...
- 运行PHP出现No input file specified错误解决办法
配置了一台新服务器,使用的是IIS + Fastcgi + PHP 5.3.X,访问php页面的时候就会报错“No input file specified” 在php.ini文件里面修改: 1.增加 ...
- wepy框架自定义组件编译报错not Found File XXX.wxss
今天在自己写wepy框架组件的时候编译后报错not Found File XXX.wxss 我去,当时我很难受啊,调用组件时结构和逻辑都正常,一写样式就原地爆炸 解决之路:1.先打开编译后的dist文 ...
随机推荐
- 使用CefSharp在.NET中嵌入Google kernel
原文:使用CefSharp在.NET中嵌入Google kernel 使用CefSharp可以在.NET轻松的嵌入Html,不用担心WPF与Winform 控件与它的兼容性问题,CefSharp大部分 ...
- vue.js 分页加载,向上滑动,依次加载数据。
export default { layout: 'default', data(){ return{ page:1, pageSize:10, orderListArr:[], prodListLo ...
- Intellij IDEA 最全实用快捷键整理
正文前: 1. IDEA内存优化(秒开的快感!!) 因机器本身的配置而配置: \IntelliJ IDEA8\bin\idea.exe.vmoptions // (根据你的配置变大!!) ------ ...
- HashMap 的实现原理(1.7)
参考 :http://wiki.jikexueyuan.com/project/java-collection/hashmap.html https://blog.csdn.net/w22981192 ...
- Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' has value '1.8', but '1.7'
第一种方法:安装1.8之前安装了1.7,将1.7卸载就好了. 第二种方法:删掉Windows\System32下的java.exe, javaw.exe 就行了,但是安装的1.8的jdk会回到1.7的 ...
- 【writeup】is_numeric函数矛盾运用
最近在BugkuCTF平台刷题,遇到‘矛盾’http://120.24.86.145:8002/get/index1.php,感觉蛮有意思的,记录下思路 目标代码如下: $num=$_GET['num ...
- 重大更新:DeepFaceLab更新至2019.12.20
本次更新增加SAEHD:lr_dropout参数,训练时可以打开或者禁用(默认禁用),每次换脸经过足够的训练后可以启用此选项以减少重复次数,从而获得额外的清晰度.还有一个比较有意义的更新是增加了图片元 ...
- feign 发送请求时,传多个参数时的写法
第一:传参方式写法,当参数个数大于2个时,需要用@RequestParam @PostMapping(value = "/configReader/configValue.do", ...
- element-ui + redis + mongo + nuxt
用户注册: let {username,password} = req.body; let u = await UserModel.findOne({username}); if(u){ res.js ...
- deepin 常见快捷键及常用命令
常用命令 1)安装软件命令行:dpkg -i <.deb file name>示例:dpkg -i avg71flm_r28-1_i386.deb2)安装一个目录下面所有的软件包命令行:d ...