自动将域映射到Homestead中的文件夹

时间:2015-07-23 18:46:41

标签: vagrant homestead

Homestead配置文件Homestead.yaml提供了将域映射到文件夹的方法,如下所示:

sites:
    - map: project.dev
      to: /home/vagrant/www/project.dev/public
    - map: some-other.dev
      to: /home/vagrant/www/some-other.dev/public
    # etc.

有没有办法自动化这个过程并将所有.dev域映射到文件夹,像这样?

/home/vagrant/www/{domain}/public

1 个答案:

答案 0 :(得分:1)

旧线程,但你可以这样做

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