You'll notice that my DocumentRoot is the "/web" sub-directory of the project. The drupal-composer/drupal-project we're starting from creates that directory by default. It's best-practice in Drupal 8 to have a sub-directory be your document root so that you can keep project dependencies like Behat and PHPUnit in your repository, but outside of the web root. It also allows you to keep things like Configuration files (from Drupal's Configuration Management system) in the Git repository, but again outside of the web accessible directory.

Once you have your hosts file and vhost file updated, you'll need to restart the server. ie: MAMP

Subscribe to the mailing list

Email Address *

First Name

Support Modules Unraveled

If you've benefited in any way from the videos or podcasts on this site, you can show your appreciation with a donation!