LoginSignup
16
15

More than 5 years have passed since last update.

homestead upした後No input file specified.と表示されました

Posted at

homestead upしたらLaravelが表示されなくて困りました。

homestead が表示されない

http://192.168.10.10/ にアクセスしたとこ表示がうまくされませんでした。

No input file specified.

No input file specified.

困りました。゚(゚´Д`゚)゚。

環境

環境はMacのHomesteadです。

nginxのログを見る

homestead upはできているようなので、sshログインします。

homestead ssh

nginxのログを見ます。

sudo tail -f /var/log/nginx/homestead.app-error.log

[error] 1782#0: *4 FastCGI sent in stderr: "Unable to open primary script: /home/vagrant/Code/Laravel/public/index.php (No such file or directory)" while reading response header from upstream, client: 192.168.10.1, server: homestead.app, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.10.10"

・・・

index.phpが見つからないようです。
実際のindex.phpファイルを調べてみると、/home/vagrant/Code/public/にsyncされていることがわかりました。

Homestead.yamlの確認

foldersのtoが不完全だったようです。

vim ~/.homestead/Homestead.yaml

folders:
    - map: /Users/pugiemonn/Documents/workspace/laravel-project
-      to: /home/vagrant/Code
+      to: /home/vagrant/Code/Laravel

Codeの後ろに/Laravelを足しました。

ブラウザを確認

今度は表示がされました。

Laravel初期画面

参考

16
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
15