簡體   English   中英

Laravel宅基地無法正常工作

[英]Laravel homestead not working

我正在嘗試設置Homestead,但無法正常工作。 我遵循了https://laravel.com/docs/5.2/homestead上的文檔,並在laracast上觀看了視頻。 但是仍然不知道為什么它不起作用。 當我轉到test.app:8000時,出現以下消息:

未指定輸入文件。

另外,當我更改homestead.yaml文件中的路徑時,我會執行“無用條款”。

這是我的homestead.yaml文件的樣子(在Homestead / Homestead.yaml中):

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

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/documents/vagrant/sites
      to: /home/vagrant/Code

sites:
    - map: test.app
      to: /home/vagrant/Code/test

databases:
    - homestead

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

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

我的文件夾的路徑:“〜/ documents / vagrant / sites”確實存在,因為我可以將其安裝到其中。 我還將test.app添加到了我的etc / hosts文件中(請參見屏幕截圖)。 在此處輸入圖片說明

我做錯了什么...現在要嘗試建立家園數小時!

在/ etc / hosts中,將127.0.0.1 test.app替換為192.168.10.10 test.app

更換

sites:
- map: test.app
  to: /home/vagrant/Code/test

sites:
- map: test.app
  to: /home/vagrant/Code/test/public

然后運行vagrant provision

在測試目錄中創建index.php ,或者如果您使用的是laravel,請將代碼更改為此

 sites:
        - map: test.app
          to: /home/vagrant/Code/test/public

也許此主題可以幫助您了解問題http://laravel.io/forum/06-04-2014-no-input-file-specified-using-homestead

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM