首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Vagrant Laravel设置,未指定输入文件

Vagrant Laravel设置,未指定输入文件
EN

Stack Overflow用户
提问于 2017-10-16 19:55:40
回答 1查看 82关注 0票数 1

我正试着把宅基地和幼体放在一个流浪汉的盒子里。当我浏览到我的url时,我得到了错误‘没有指定输入文件’:

http://homestead.app/,我在我的主机文件192.168.10.10 homestead.app中有这个设置

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

代码语言:javascript
复制
---
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,我会收到这样的消息:

代码语言:javascript
复制
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显示homestead正在运行

Git bash显示安装了homestead:

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

我在哪里安装Laravel,如何获得基本的站点设置?

这是我重新加载时的powershell:

代码语言:javascript
复制
  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>
EN

回答 1

Stack Overflow用户

发布于 2017-10-16 20:01:48

您的站点应该是homestead.app而不是homestead.localhost。在Homestead.yaml文件中,或者在hosts文件中反之亦然。试着改变它,然后运行流浪汉条款!

编辑

应用以下更改:

代码语言:javascript
复制
authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

map: C:/Sites
  to: /home/vagrant/Sites
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46769748

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档