Drupal is a web-based Content Management System (CMS) . Its purpose is to provide a flexible and powerful system for building a wide variety of websites. To that end, it not only has a flexible content management core, but also provides a modular system in which add-on modules can hook into just about any piece of Drupal. With over seven thousand modules available, Drupal has become a choice tool for constructing robust and feature-rich websites.
It should be evident already that Drupal can do many things. This book is focused on one of those things. A single instance of Drupal can be used to run more than one website. This means you can install the Drupal software once and have it drive more than one website. This feature is called multi-site hosting. Over the course of this book, we will learn how to install, configure, and manage a multi-site Drupal instance.
This first chapter covers the basics of running multiple sites. It is conceptually divided into two sections: The first is focused on what multi-site hosting is all about, and the second is on how we can start building a multi-site capable server.
In the first part we look at several common ways of building a multi-site—some of which are Drupal-specific, and some of which are not. By the end of this section you will be familiar with the problems that are solved by multi-site installations, as well as what options there are for hosting multiple sites on a single server.
While there are several ways to host multiple sites on the server, this book is focused only on one particular method: Using Drupal's built-in multi-site capabilities to host several sites on one copy of Drupal's code. After reading about other methods, you may discover that one of those suits you better, and where possible I have inserted references detailing those other methods. But for those who see Drupal's multi-site capability as meeting their needs, the remainder of this chapter (and the rest of the book) walks through the process of setting up such a platform.
In the second part of the chapter we will configure a local testing environment. It is not necessary that you run an environment identical to this, but by using Virtual Box and Vagrant to set up a standard virtual machine, this book will create an environment that you should be able to replicate should you so desire. (We will learn more about VirtualBox, as well as manual configuration, later in this chapter.)
To get started, let's look at the relationship between a website and the server that runs it.