We have been creating some real cool stuff with drupal CMS and django since January 2007. That is why most of our clients come back to us when they have to get a second(or third or forth) project done
Drop us an email at info (at) ikraftsoft (dot) com to know more about what kind of work we have accomplished and what our clients say about our work.
Visit http://ikraftsoft.com if you prefer, but most of the stuff about our knowledge is here ;).
Assuming you have basic drupal 6 installation already working on a LAMP server. Below are the steps to setup multiple sites to work on same drupal core like site1.com, site2.com etc.
Create site databases Start by creating databases for each site like site1, site2 etc thereby setting specific credentials to each database created.
Setup drupal site configuration directories Copy and paste /sites/default directory and rename the copied directories to /sites/site1.com, /sites/site2.com directories. The only important file from the /sites/default directory being settings.php, you can skip all the other files/directories while copying /sites/default directory. Although, later on you might need to create several different directories within each site directory like files, modules, themes etc contents of whom will be specific to that site. Edit settings.php file of each site and set database details specific to each site.
Create virtual hosts for each site under Apache2 Steps for creating virtual hosts under debian/ubuntu based systems. Open terminal use below commands
$ cd /etc/apache2/sites-available $ sudo gedit site1.com
Put below contents within this file
<VirtualHost 127.0.1.5:80>
ServerAdmin webmaster@localhost
ServerName site1.com
DocumentRoot /home/umar/Work/htdocs/drupal6
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/umar/Work/htdocs/drupal6>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Now enable the site with following command
$ sudo a2ensite site1.com
Repeat the above steps for all sites with unique local IP’s for each site. When done with creation of all files reload apache
$ /etc/init.d/apache2 reload
Now edit the /etc/hosts file to include mapping of these new sites like
$ sudo gedit /etc/hosts
With contents like
127.0.0.1 localhost 127.0.1.5 site1.com 127.0.1.6 site2.com
Thats all there is to it, now go to url like http://site1.com/install.php of each site and follow normal drupal installation procedure.
I will soon be posting article showing usage of single DB between multiple drupal sites configuration.
Cheers