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文 ...
随机推荐
- paramiko : 错误集整理
错误1 时间2017-12-19:No handlers could be found for logger "paramiko.transport" 解决办法:parami ...
- C#解决并发的设计思路
解决并发的方案,应用场景,一个报名的方法,可是要限制报名的人数:一,如果是单机版,就是部署一个服务器站点的我们可以使用很经典的lock锁,或者queue队列,针对单机版二,如果是部署了集群的站点1&g ...
- 微信小程序里多出来的奇怪宽度
最近在看微信小程序相关的东西,写页面的时候,因为一直以Iphone6作为标准调试(微信官方建议以Iphone6调试),下面以实际的案例讲解以rpx会引发的问题 wxml: <view class ...
- 如何把maven文件pom.xml中的java包下载下来
右击pom.xml文件,选择Run As-->Maven build- 在打开的页面中,如图输入"dependency:copy-dependencies",后点击" ...
- hbase报错org.apache.hadoop.ipc.RemoteException(java.lang.NullPointerException): java.lang.NullPointerException
这个错误找了好长时间,日志看半天,找度娘没什么用,再看stackoverflow,上面有几篇相关的帖子,但是没人回答. 看半天,没有cause,只好到idea中去看sortLocalSorts源码,结 ...
- String转int,int转String
String转int 1) int i = Integer.parseInt([String]); int i = Integer.parseInt([String],[int radix]); 2 ...
- ALV打印不显示打印界面的问题
用OO的方式screen0 不画屏幕会产生这个问题,解决办法就是不用screen0 要自己画一个区域
- Core Graphics绘图
首先了解一下CGContextRef: An opaque type that represents a Quartz 2D drawing environment. Graphics Context ...
- Assets.xcassets的详细使用方法
开始之前,首先回顾一下iOS7初体验(1)——第一个应用程序HelloWorld中的一张图,如下所示: 本文分享一下Images.xcassets的体验~_~ 1. 打开此前使用过的HelloWorl ...
- 当有多个相同的DIV时,我怎么判断我点击的是哪个
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...