首页 > 解决方案 > Dynamic mapping of all *.test domains for Homestead

问题描述

I'm using dnsmasq to access all *.test domains locally. Now, I'd like to make Homestead box automatically point each domain to appropriate project. So if I go to foo.test, it would open the project at /foo.test/public directory. It's very convenient, as my machine doesn't need to be provisioned for new projects. I used to have it working by setting up in Homestead.yaml:

- map: '~^(?<project>.+\.test)$'
  to: /home/vagrant/code/$project/public

However, a few versions ago it stopped working, giving the following error:

==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Creating Certificate: ~^(?.+.test)$
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

There is a commit that gives some hope: Self-Signed Wildcard Certificates.

Is it currently possible to set up Homestead like I'm trying to?

标签: laravelnginxhomestead

解决方案


推荐阅读