Vagrant lavavel设置,未指定输入文件

时间:2017-10-16 11:55:40

标签: laravel vagrant homestead

我正试图在一个流浪盒上设置宅基地和laravel。我收到错误'没有指定输入文件'当我浏览我的网址时:

http://homestead.app/,我在主机文件192.168.10.10 homestead.app

中进行了此设置

我当前的Homestead.yaml文件位于c:/users/me/Homestead,如下所示:

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

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: C:/Sites/Homestead_Projects
      to: /home/vagrant/Sites

sites:
    - map: homestead.app
      to: /home/vagrant/code/laravel/public

databases:
    - homestead

我运行vagrant up时收到此消息:

Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> 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.
PS C:\Users\me\Homestead>

我希望存储我的项目文件,C:\sites\Homestead_Projects此时此内容为空。

有人可以建议我如何让我的laravel网站启动并运行吗?

我的Virtualbox声称家园正在运行

enter image description here

Git bash显示已安装家园:

enter image description here

我的本​​地文件夹中还安装了一个基本的laravel网站:

enter image description here

我在哪里安装Laravel以及如何设置基本网站?

重装时,这是我的powershell:

  PS C:\Users\Becky\Homestead> vagrant reload --provision
==> homestead-7: Attempting graceful shutdown of VM...
==> 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: 4040 (guest) => 4040 (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/Becky/Homestead
    homestead-7: /home/vagrant/Sites => C:/sites/Homestead_Projects
==> homestead-7: Running provisioner: file...
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: C:/Users/Becky/AppData/Local/Temp/vagrant-shell20171016-6452-167i9e9.sh
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Creating Certificate: homestead.app
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Creating Site: homestead.app
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Checking for old Schedule
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Restarting Nginx
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Creating MySQL Database: homestead
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Creating Postgres Database: homestead
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Clear Variables
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Update Composer
==> homestead-7: You are already using composer version 1.5.2 (stable channel).
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: C:/Users/Becky/AppData/Local/Temp/vagrant-shell20171016-6452-196tg7e.sh
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: C:/Users/Becky/AppData/Local/Temp/vagrant-shell20171016-6452-1v1vhk.sh
PS C:\Users\Becky\Homestead>

1 个答案:

答案 0 :(得分:0)

您的网站应该是homestead.app而不是homestead.localhost。在您的Homestead.yaml文件中,或反转为hosts文件。尝试更改它,然后运行vagrant provision!

修改

应用以下更改:

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

map: C:/Sites
  to: /home/vagrant/Sites