2017-10-16 126 views
1

我想在流浪盒上設置宅基地和laravel。我得到的錯誤,當我瀏覽到我的網址「沒有指定輸入文件」:Vagrant lavavel設置,沒有指定輸入文件

http://homestead.app/,我有這個安裝在我的hosts文件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> 
+0

地圖:homestead.app – mbozwood

回答

0

您的網站應該homestead.app代替homestead.localhost。在你的Homestead.yaml文件中,或者反轉爲hosts文件。嘗試改變它,然後運行無業提供!

編輯

採用以下修改:

authorize: ~/.ssh/id_rsa.pub 

keys: 
    - ~/.ssh/id_rsa 

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

我已經試過了仍然得到同樣的錯誤 – Bomber

+1

我會更新我的答案! –

+1

改變後你應該準確運行'vagrant reload --provision' –

相關問題