我是宅基地的新手。我用VitualBox和Vagrant完成了宅基地的所有设置。在Vagrant之后,我在终端收到了以下消息:
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 5.1
==> default: Mounting shared folders...
default: /vagrant => /home/prabhu
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
但仍无法启动homestaed.app或收到任何错误。 请帮忙。
答案 0 :(得分:2)
我假设您使用的是Linux或Mac, 如果是这样,你必须将homestead.app“路由”到你的机器上。
编辑/ etc / hosts并添加以下行:
192.168.10.10 homestead.app
默认情况下,宅基地使用192.168.10.10
作为机器,因此它应该有效。
编辑:
在虚拟机中创建新项目
vagrant ssh
与ssh连接到机器composer create-project laravel/laravel your-project-name
然后,确保将项目文件夹与虚拟机中的项目文件夹链接。
检查您的Homestead.yaml上是否有此内容
folders:
- map: ~/your-project-folder
to: /home/vagrant/your-project-folder
map
是您的本地文件夹,to
是将在虚拟机中创建的文件夹。
然后,编辑您的Homestead.yaml并为您的项目创建一个新的site
,我的看起来像那样
sites:
- map: development.app
to: /home/vagrant/plannerking/public
- map: vetur.app
to: /home/vagrant/vetur/public
- map: mailprocess.app
to: /home/vagrant/mailprocess/public
最后,在/etc/hosts
中写下新项目ex: mailprocess.app
的名称,并将其路由到虚拟机。
192.168.10.10 mailprocess.app
一切都很好解释here
答案 1 :(得分:-1)
请勿使用.app
之类的gTLD域扩展,而应使用.test
,.local
等