日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

legend3---用Homestead配置后报错“No input file specified.”

發布時間:2025/7/14 编程问答 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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"

?

?

?

?

?

?

轉載于:https://www.cnblogs.com/Renyi-Fan/p/11502962.html

總結

以上是生活随笔為你收集整理的legend3---用Homestead配置后报错“No input file specified.”的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。