r8 / vagrant-lamp

My default LAMP development stack for Vagrant
http://r8.github.io/vagrant-lamp/
752 stars 255 forks source link

Creating subdomain as second level directory #104

Open tconroy opened 10 years ago

tconroy commented 10 years ago

Hi,

Below is my vagrant public directory structure:

|-public
|---local.dev
|-----studentaffairs
|-------w-asc
|---------www
|-----------index.php

I have my main site: local.dev. Here is the contents of its local.json file inside the data_bags/sites dir:

{
   "id": "local",
   "host": "local.dev",
   "aliases": [
       "www.local.dev"
   ]
}

I want to have subdomains branching off of this main domain. In the example above, w-asc is one of those. w-asc should have its own root directory, set to the www folder inside.

I want to be able to go to www.local.dev/studentaffairs/w-asc, and have the contents of w-asc/www displayed, with www as the site root.

This is the contents of the w-asc.json in data_bags/sites:

{
    "id": "w-asc",
    "host": "local.dev/studentaffairs/w-asc",
    "aliases": [
        "www.local.dev/studentaffairs/asc"
    ],
    "docroot": "/vagrant/public/local.dev/studentaffairs/w-asc/www"
 }

however this doesn't seam to work as I want.

How can I configure my sites for the desired functionality?