duan19911992 2017-09-30 15:44
浏览 68

运行Laravel Homestead时“没有指定输入文件。”

I've installed Laravel Homestead and edited my host file but when I visit the specified URL in my browser I get the message "No input file specified." after running "vagrant up" in terminal. My initial guess is something's incorrect in the Homestead.yaml file but I can't see what.

I'm running Mac OS and my VM is a VirtualBox one. All my websites are in a folder called "Sites" which is a direct child of the OS user, so Username/Sites. The path of my Homestead folder is also in there like this: _Username/Sites/_homestead".

In the Homestead.yaml file I set my 'folder' to map: ~/Sites - that should mean when I visit the specified URL in the browser I get a list of folders (all of my websites), right? Or at least that was the result I'm expecting.

If I type ~Sites/ in my browser address bar I do see a list of folders so the location is correct. It redirects to file:///Users/USERNAME/Sites/

Before I run vagrant up 'username.dev' will not work when typed in the address bar, afterwards it does. So I assume that's all correct as it does pick it up.

This is the contents of my Homestead.yaml file for reference:

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

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Sites
      to: /home/vagrant/Code

sites:
    - map: username.dev
      to: /home/vagrant/Code/public

databases:
    - homestead

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

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

Can anyone see what's wrong or advise on what else is could be?

  • 写回答

2条回答 默认 最新

  • drphfy1198 2017-09-30 23:49
    关注

    if the folder Username/Sites contains different site folders, try to map the URL to: /home/vagrant/Code/yourSiteFolderName/public

    and run vagrant reload --provision or vagrant up --provision to reload the configuration

    评论

报告相同问题?

悬赏问题

  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭