Homestead文件夹不会使用我的文件更新已安装的文件夹

时间:2017-10-08 19:33:08

标签: php laravel homestead

当我尝试设置它时,所有内容似乎都可以在我的Windows 10框中运行,我可以通过http://127.0.0.1:8000访问它,但不是http://Homestead.app此外,最大的问题是无法访问我的文件已安装的文件夹。我已经将文件路径更改为正斜杠而不是路径上的反斜杠,但我无法访问我的应用程序的文件。

==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Clearing any previously set forwarded ports...
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
    homestead-7: Adapter 1: nat
    homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
    homestead-7: 80 (guest) => 8000 (host) (adapter 1)
    homestead-7: 443 (guest) => 44300 (host) (adapter 1)
    homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
    homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
    homestead-7: 8025 (guest) => 8025 (host) (adapter 1)
    homestead-7: 27017 (guest) => 27017 (host) (adapter 1)
    homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    homestead-7: SSH auth method: private key
==> homestead-7: Machine booted and ready!
==> homestead-7: Checking for guest additions in VM...
==> homestead-7: Setting hostname...
==> homestead-7: Configuring and enabling network interfaces...
==> homestead-7: Mounting shared folders...
    homestead-7: /vagrant => C:/Users/mattr/boxes/Homestead
==> homestead-7: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> homestead-7: flag to force provisioning. Provisioners marked to run always will still run.

我的CLI是调出流浪盒的结果。

和我的Homestead.yaml是

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

authorize: C:/Users/mattr/.ssh/id_rsa.pub

keys:
    - C:/Users/mattr/.ssh/id_rsa

folders:
    - map: ~/Code/test/
      to: C:/Users/mattr/Projects/home_lara/

sites:
    - map: homestead.app
      to: /home/vagrant/Code/test/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

谢谢,如果你能帮助我,我真的很感激它。如果我缺乏任何细节评论,我会很快抓住它们。

1 个答案:

答案 0 :(得分:0)

为了能够通过<div> <input type='date' class='center' value='2006-01-01' width='100' required="required"> </div>访问您的应用,您必须将其添加到位于homestead.app的主机文件中,只需编辑它并添加以下行:

C:\Windows\System32\drivers\etc\hosts

为了保存您在homestead.yaml文件中所做的修改,请尝试 运行命令192.168.10.10 homestead.app

哦,我刚看到你在文件夹部分中反转链接,你应该将项目文件夹映射到/ home / vagrant / code,告诉服务器代码foler将指向你的项目文件夹,如下所示: / p>

vargant reload --provision