简体   繁体   中英

Laravel homestead not working

I'm trying to setup Homestead but it's not working. I've followed the documentation on https://laravel.com/docs/5.2/homestead and watch the videos on laracast. But still can't figure out why it's not working. When I go to test.app:8000 the following message shows up:

No input file specified.

Also when I changed paths in my homestead.yaml file I exec "vagrant provision".

This is how my homestead.yaml file looks like (in Homestead/Homestead.yaml):

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/documents/vagrant/sites
      to: /home/vagrant/Code

sites:
    - map: test.app
      to: /home/vagrant/Code/test

databases:
    - homestead

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

The path of my folders: "~/documents/vagrant/sites" does exist because I can cd into it. I also added test.app to my etc/hosts file (see screenshot). 在此处输入图片说明

What am I doing wrong... Trying to setup homestead for hours now!

In your /etc/hosts replace 127.0.0.1 test.app with 192.168.10.10 test.app .

Replace

sites:
- map: test.app
  to: /home/vagrant/Code/test

with

sites:
- map: test.app
  to: /home/vagrant/Code/test/public

Then run vagrant provision .

Create index.php in your test directory or if you are using laravel change your code to this

 sites:
        - map: test.app
          to: /home/vagrant/Code/test/public

Maybe this topic help you to understand the problem http://laravel.io/forum/06-04-2014-no-input-file-specified-using-homestead

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM