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文 ...
随机推荐
- RabbitMQ入门教程(九):首部交换机Headers
原文:RabbitMQ入门教程(九):首部交换机Headers 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog ...
- JS作用域及域解析规则
1.JS作用域:变量和函数作用的范围. 2.JS解析器可以分为域解析和逐行解读代码两个过程. 域解析:1.当进行域解析的时候,一旦找到var,就会提取后面的变量名,并给它赋值给undefined. 2 ...
- ld - GNU linker (连接器)
总览 (SYNOPSIS) ld [-o output] objfile... [-Aarchitecture] [-b input-format] [-Bstatic] [-Bdynamic] [- ...
- mariadb索引、视图、关联查询、备份恢复、外键
连接查询(两张表关联查询) 在sql语句中,- - 代表注释 内关联查询(查询两张表的交集) select * from 表1 inner join 表2 on 表1.id=表2.id(此处id是表1 ...
- PAT Advanced 1050 String Subtraction (20 分)
Given two strings S1 and S2, S=S1−S2 is defined to be the remaining string after taking ...
- scp 远程文件复制命令
scp 远程文件复制工具 1.命令功能 scp用户在不同linux主机间复制文件,他采用ssh协议保障复制的安全性.scp复制是全量完整复制,效率不高,使用与第一次复制,增量复制建议rsync命令. ...
- 怎么画一条0.5px的边
编者按:本文由人人网FED发表于掘金,并已授权奇舞周刊转载 什么是像素? 像素是屏幕显示最小的单位,在一个1080p的屏幕上,它的像素数量是1920 1080,即横边有1920个像素,而竖边为1080 ...
- 错误:The selected wizard could not be started Plug-in com.genuitec.eclipse.j2ee.ui was unable to load class com.genuitec.eclipse.j2ee.ui.wizard.WebProjectWizard
错误:The selected wizard could not be started Plug-in com.genuitec.eclipse.j2ee.ui was unable to load ...
- HDU-3081-Marriage Match 2(最大流, 二分答案, 并查集)
链接: https://vjudge.net/problem/HDU-3081 题意: Presumably, you all have known the question of stable ma ...
- javaScript中的 this
普通函数中的 this // es3中 function foo() { console.log(this);// 这里的this是 window } foo(); // 在es5中 严格模式下 fu ...