Drupal Multi-site testing
I've decided to take on multi-sites for Drupal. The idea behind multi-sites is that you have MANY Drupal sites running off of a single instance of the core files and anything available to the site under the /sites/all/* directories, YET each site has it's own database or tables can be shared across multiple sites, specifically users and roles.
The main purposed for me to mess with this is I will be constructing a set of automated squeeze page sites and there will be some options available. However a multi-site seems perfect as I will be using a couple of modules that aren't "Domain Access" module aware.
Below are the steps I have done with my first round of testing, I got this set of instructions from http://drupal.org/node/278987, but sad to say with my hosting account they seem not to work when it comes to the symbolic links.
STEP 1. Create your initial Drupal 6 site. In this example, the URL is "www.yourdomain.com" and the first MySQL database is site1db
Created "home2/acct_name/public_html/myreisystem" (contains my Drupal 6 install and main site of MyREISystem.com)
STEP 2. Use cPanel to create a new MySQL database for your second site, which we'll call site2db.
Created "dbname_reiclaude"
STEP 3. Use cPanel's file manager to create a new folder in your Drupal "sites/" folder which matches the URL you want for the second site. In this example, in which we want a subdomain called "site2.yourdomain.com", we would create a folder called site2.yourdomain.com (If you prefer the URL to be "yourdomain.com/site2", you would create a folder called yourdomain.com.site2
DONE! See images below, as you can see the Domain MyREISystem.com folder now has "/sites/claude.myreisystem.com"

STEP 4. Download and edit the settings.php file from the sites/default folder, replacing the line containing
your first site's datbase information with your second site's database details, eg:
$db_url = 'mysql://username:password@localhost/site2db';
$db_prefix = '';
Change the username and password, if
required, to reflect the cPanel user settings for the second database (site2db).
Then upload the edited settings.php file to the new folder you created in step
three (site2.yourdomain.com)
DONE see image
STEP 5. If you want a subdomain for your second site, create one now in cPanel. For the above example ("site2.yourdomain.com"), a folder named site2 will be automatically created by cPanel. (see images below, screenshots from my cPanel)
![]() |
![]() |
STEP 6. Delete the folder that was created for the subdomain.
DONE see image
STEP 7. Now create a "symlink" using a PHP file with this syntax:
In our example, the PHP file would look like this:
<?php
symlink('/home/username/public_html/', 'site2');
?>
Of course, you would change the path to the real path to your root Drupal folder.
<?php
symlink('/home2/acct_name/public_html/myreisystem/', 'claude');
?>
DONE see final image below
STEP 8. Save the file as multisite.php and upload it to your site's web root, eg: /home/username/public_html/
DONE!
STEP 9. Go to the location of this php file in your browser (eg "www.yourdomain.com/multisite.php"). The Web page will appear blank but it will have done its job by creating the symlink.
DONE! No warnings or messages, this is a GOOD thing
STEP 10. Now use your browser to run Drupal's install.php script on your second site. In our example, we would go to this URL: "www.site2.yourdomain.com/install.php"
Gets the following
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@claude.myreisystem.com and inform them of the time the
error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.15 (CentOS) mod_ssl/2.2.15 0.9.8l DAV/2 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635 Server at www.claude.myreisystem.com Port 80

STEP 11. Drupal should now be ready to install.
NOPE, it Fails, see above





