Community Documentation

Multi-site on Linux

Last updated August 13, 2009. Created by bekasu on August 13, 2009.
Log in to edit this page.

Software installed:

  • Drupal 7
  • Apache 1.3
  • Red Hat 6.1 (Although other distributions will work)
  • PHP5
  • PostgreSQL 7.4

The process:

  1. Install the Drupal core download from Drupal.org.
  2. Install default Drupal site. I created mine with a "dummyUSER" user and "dummyDB" database with Drupal code in apache/htdocs/drupal
  3. Once you have this working then create a new dir "example1.com" directly under "sites" dir.
    mkdir sites/example1.com
    cp -R sites/default/*  sites/example1.com/
  4. Create a new database "example1DB" and new user "example1USER" in database.
  5. Edit the sites/example1.com/settings.php and change the following:
    • $db_url = 'pgsql://dummyUSER:dummyPSSWDl@localhost/dummyDB';
      to $db_url = 'pgsql://example1USER:example1PSSWDl@localhost/example1DB';
    • (this step is optional, normally Drupal will recognise the base url automatically):
      # $base_url = 'http://www.example.com';
      to $base_url = 'http://www.example1.com'; (Remove the '#' [comment])
  6. cp apache/htdocs/drupal/install.php to apache/htdocs/drupal/sites/example1.com/
  7. Point your browser to www.example1.com. Drupal will show you lot of errors.
  8. Once it shows you errors you are all good. Just point your browser to www.example1.com/install.php and it will present you the installation screen. Install from there on.
  9. Repeat the above process for www.example2.com

Note
If it says the site is offline then your database information in settings.php is not correct. If it says site not found then your base url in settings.php is not correct.

Page status

About this page

Drupal version
Drupal 7.x

Archive

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here