When preparing our environment for setting up a Drupal multi-site, we first walked through a setup using a special Vagrant virtual machine profile. Then we looked at the manual configurations necessary for Apache and for MySQL. Specifically, we set up an Apache virtual host capable of listening for all three of our hosts (books.local, cooks.local
, and looks.local)
. Then we created three databases in MySQL: books_local, cooks_local
, and looks_local
.
Note
It is best to create one database per site. Only when absolutely necessary should you install multiple Drupal sites into the same database instance. For example, if you are only allocated a single database instance for multiple sites, you can use Drupal's database prefix feature, which is documented online at http://drupal.org/documentation.
Running the custom Vagrant profile gives us not only a complete Linux/Apache/MySQL/PHP stack, but also pre-configures the environment for Drupal. And since Vagrant runs its own virtual server...