';404找不到文件';和';未指定Inut文件';尝试通过Homestead运行和安装lara


'404 File Not Found' and 'Inut file not specified' errors while trying to run and install laravel through Homestead

你好,我正试图通过homes为我的项目学习Laravel,为了做到这一点,我甚至学习了一些教程,但尽管遵循了所说的一切,我仍然在浏览器中收到错误404 File Not Found。我哪里做错了?

这是我的Homestead.yaml文件:-

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
    - ~/.ssh/id_rsa
folders:
    - map: /Applications/XAMPP/htdocs/Fae
      to: /home/vagrant/Code
      type: "nfs"
sites:
    - map: homestead.app
      to: /home/vagrant/Code/Laravel/public
      hhvm: true
databases:
    - homestead
# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar
# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

我尝试了链接为laravel解决404错误所给出的解决方案,但随后我得到了另一个错误Input file not specified。我真的很沮丧,因为我找不到这个问题的原因,尽管我尽了所有的努力

以下是虚拟机中的文件结构:当前工作目录为/home/vagrant/Code

total 20
drwxr-xr-x  4     501      80  136 May  9 21:34 ./
drwxr-xr-x  7 vagrant vagrant 4096 May  9 22:10 ../
-rw-r--r--  1     501      80 6148 May  9 21:27 .DS_Store
drwxr-xr-x 23     501      80  782 May  9 21:36 homestead.app/

以下是我的mac中yaml文件的map属性所指示的文件夹的结构:当前工作目录为/Applications/XAMPP/htdocs/Fae

total 0
drwxr-xr-x  23 pavan7vasan  admin  782 May  9 14:36 homestead.app

我错过了什么?

你好,我建议你使用Laravel Valet istead of home

这将解决您的所有问题。

这可能是您的yaml文件设置

尝试将其从旧的XAMPP文件夹中移出,并为其创建一个新的文件夹,因此编辑以下内容:

  folders:
     - map: /Applications/XAMPP/htdocs/Fae
       to: /home/vagrant/Code
       type: "nfs"
  sites:
     - map: homestead.app
     to: /home/vagrant/Code/Laravel/public
     hhvm: true

去做类似的事。

  folders:
      - map: ~/Desktop/Websites
        to: /home/vagrant/Code
  sites:
      - map: domainnamehere.dev
        to: /home/vagrant/Code/domainnamehere/public

如果你特别查看设置的文件夹,也许会将你的文件夹更改为类似的文件夹,我在桌面上创建了一个网站文件夹。看起来你使用的是XAMPP的默认位置,尝试完全在XAMPP之外进行,单独进行,一旦更新就运行流浪条款来更新etc