Web design, programming, graphics, and pretty much anything else I care about.


Multisite using alias in Apache config

People are always having issues setting up a multisite using Drupal. Part of the hangup is working out the symbolic links you have to create. Why? At the heart of it, Apache needs to find the index.php in the root of the Drupal installation, regardless of what URL is used to access it.


It doesn't matter what address you are using, as long as you do something to point Apache to your index.php file. For some people this means using a symbolic link in your Drupal root, like so:

Apache rewrite for subdirectory-based Drupal multisite

In a multisite setup where there is a mix of sites based on subdomains, as well as subdirectories, the rewrite can be more complicated. Use this for the subdirectory based sites:

Drupal multisite configuration

Drupal can do the following:


All these sites can use the same Drupal installation. The key is to point all of them at the same index.php file, which is in the root of the Drupal installation. This requires either a symbolic link to connect a site sub-directory to the installation directory, or Apache modification to do it. Once the request is received by Drupal, it will know which site to retrieve. /smoke and mirrors