Now we are ready to move from questions about what a multi-site is to the actual setup and configuration of a multi-site server. Here, we will be creating an environment that, in the next chapter, will run our Drupal-based multi-site.
The first thing we will need is a server. You may choose to use your local computer as a temporary server. Or you may use a server provided by an Internet Service Provider (ISP). Or you can use a separate dedicated piece of hardware. But for our purposes, we will be creating what is called a virtual server—a complete operating system that runs inside of our current operating system. This server will run its own Linux operating system.
As we configure things below, we will be using Apache on Ubuntu Linux. While Apache configurations work essentially the same on all platforms, different operating systems and distributions organize the files in their own ways. You may wish to consult your operating system's documentation to learn about these differences.
Note
If you are running your sites on a shared-hosting or managed-hosting platform, chances are that you will not need to configure Apache. Instead, you should work with your hosting provider to set up virtual hosting.
In what is left of this chapter, we will focus on creating an environment in which to run our Drupal multi-site. I am going to walk through two ways of doing this:
First, we can install a virtual machine pre-configured for this book. We do this with the open source VirtualBox and Vagrant tools, along with a custom Drupal Vagrant profile. This route is great for testing things out on your local workstation. It is a great way of building "disposable" sites that we can develop with. They can be created and deleted without impacting your local "host" computer. It's like having your own personal development server(s), but without the hardware cost.
Second, we can begin with an established server running Apache, MySQL, and PHP. From there, we can just focus on tuning Apache and creating a few MySQL databases. Note, though, that this route will require you to handle getting the rest of the server configured. However, if you are hosting your sites on a managed service provider or shared hosting account, your hosting provider will probably do all of this for you at your request.
In the next section we will look at the VirtualBox and Vagrant method for running a development environment locally. If this is not to your taste, you can skip and move ahead.