I am trying to set up homestead. I have tried to add new custom domain but I forgot that I have to run the command vagrant provision and I got an error, so I have decided to uninstall Vagrant VirtualBox and start from scratch but I have realy messed the things up.

现在我已经安装了VirtualBox, vagrant .我已经在我的主目录中克隆了HOMESTAAD的存储库.我填满了Homestast.yaml,但当我开始使用 vagrant Up时,我得到了这个错误

需要一个流浪环境或目标机器来运行此操作

When I try with vagrant init a new box is created and when I start vagrant up I am not in the homestead box but in the one that I last created.

I am really confused and I don`t know what I am missing. Any help will be appreciated.

编辑

此外,当我try homestead up时,虚拟机正在运行,我可以通过ssh连接,但当我键入自定义域时,我会得到"未指定输入文件"

update:

In the ~/.homestead directory I have executed vagrant init laravel/homestead and now I can start the the machine and to connect through ssh but I can`t go to a registered custom domain - the page is not available.

Update 2:

另外,我刚刚判断了一下,在home stead服务器上,我的代码文件夹是空的.在这Homestead.yaml个文件中,我有文件夹 - map: ~/Code to: /home/vagrant/Code

All my projects are there in the local folder and I have no idea why they are not on vagrant.

推荐答案

99%你在错误的目录中.确保目录包括Vagrantfile.

Laravel相关问答推荐

当使用Craftable PRO时,Wysiwig是什么时候生成的?

在Laravel Sail Docker环境中的PHPMyAdmin中出现`Out of Memory‘错误

如何让 Laravel 的 Collection 表现得像一个流?

阻止用户查看其他用户正在查看的内容的最佳方法是什么?

"public/index.php" 可以在 laravel 中按组写入

Laravel 4:如何将 WHERE 条件应用于 Eloquent 类的所有查询?

没有 index.php 的路由不起作用

合并两个 Eloquent 集合并删除所有重复项.

Laravel 查询构建器 - 如何按别名分组,或进行原始 groupBy

Laravel 5.5 在迁移文件中设置整数字段的大小

Laravel 扩展验证自定义消息

Laravel 将参数从路由传递到过滤器

调用未定义的函数 mb_strimwidth

如何在 Laravel 查询中使用多个 OR、AND 条件

Laravel Eloquent 查询生成器默认 Where 条件

Laravel 5 Carbon 全局语言环境

Laravel 删除集合中的第一项

Eloquent的 attach/detach/sync 触发任何事件?

如何在 Laravel 中动态更改 .env 文件中的变量?

Laravel 更新查询