Needless to say, the reason for setting up AMP is to run Drupal on it. And setting up a virtual host is really useful.
Virtual host?
A virtual host (also referred to as vhost) allows you to access a resource (i.e. a website in this case) in arbitrary names. For example, if you have a Drupal site set up (let's call it 'site1') without a virtual host, they are most likely accessible from a web browser by the URL 'http://localhost/site1'. By setting up a virtual host, you can make the site accessible with pretty much any URL you like, for example 'http://site1.dev'.
Overview of the process:
- Edit apache's config file
- Create and edit a new virtual host config file
- Create a directory and settings.php for the site for Drupal
- Edit hosts file
- Reboot apache