Apache virtual hosts for Drupal
Configure Apache virtual hosts for a clean Drupal environment and multi-site development.
The virtual hosts follow the pattern d[VERSION]x.loc, for example Drupal 7 development takes place at d7x.loc and any sub-domains would be sub1.d7x.loc. By default the virtual hosts point to '/srv/www/htdocs/drupal-x', but you can configure the location by using the drupal-vhosts script.
The script should be in your run path so you can execute it using its name. The script will then ask you for the new root location for you Drupal development. Since the script will be modifying apache configuration files it needs to be executed from the root user.