Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Apache 2

Steven Jones edited this page Jun 15, 2016 · 2 revisions

Parrot comes with an upgraded Apache 2.4, set up to serve PHP requests and with some helpers for developing more easily.

Virtual hosts and Sites

Parrot is designed to be able to host multiple sites at the same time, so you can work on multiple projects within the same guest VM.

Parrot also comes with some Puppet magic that will create the virtual hosts for your sites automatically. To use this, all you need to do is create a folder within:

sites/

That contains your site and run vagrant provision. Parrot will create a virtual host and restart apache for you. The virtual host's domain will be the same as the directory name you create, so you might want to create directories that look like this:

sites/website.computerminds.drupal

Note that you still need to make a hosts file entry on your host machine so that you can resolve your domain name to 127.0.0.1.

Sites are mapped to the following directory on the guest machine and the sites are served from there:

/vagrant_sites/

Webroot magic

To aid development, if your site has a folder called:

webroot

Then this folder will be used as the webroot in Apache.

So you can have the following folder structure:

- sites
  - sitea.parrot
    - info.php
  - siteb.parrot
    - assets
    - webroot
      - info.php

Then you would be able to load sitea.parrot like this:

http://sitea.parrot/info.php

But you would also be able to load siteb.parrot like this:

http://siteb.parrot/info.php

Note that we don't have to specify the webroot in the URL.

Clone this wiki locally