繁体   English   中英

Laravel宅基地无法正常工作

[英]Laravel homestead not working

我正在尝试设置Homestead,但无法正常工作。 我遵循了https://laravel.com/docs/5.2/homestead上的文档,并在laracast上观看了视频。 但是仍然不知道为什么它不起作用。 当我转到test.app:8000时,出现以下消息:

未指定输入文件。

另外,当我更改homestead.yaml文件中的路径时,我会执行“无用条款”。

这是我的homestead.yaml文件的样子(在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

我的文件夹的路径:“〜/ documents / vagrant / sites”确实存在,因为我可以将其安装到其中。 我还将test.app添加到了我的etc / hosts文件中(请参见屏幕截图)。 在此处输入图片说明

我做错了什么...现在要尝试建立家园数小时!

在/ etc / hosts中,将127.0.0.1 test.app替换为192.168.10.10 test.app

更换

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

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

然后运行vagrant provision

在测试目录中创建index.php ,或者如果您使用的是laravel,请将代码更改为此

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

也许此主题可以帮助您了解问题http://laravel.io/forum/06-04-2014-no-input-file-specified-using-homestead

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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