Aside

Drupal as a CMS with multi site setup

I was lookking for a CMS solution for my web site “rvishwakarma.com” and also wanted another site “luhar.co.in” to be parked in case i had another idea that i wanted to put up in no time. I had to setup a local setup in order to develop these two sites and make it customizable using the power of Drupal.

The documentation at the Drupal site was extensive but still i wanted to cover as one crucial step was missing there regarding the settings.php file copy.

A Youtube link for a Single Site quickstart:

 

Multi-Site Setup Steps :

1. Install “xampp” as above or from the help (http://www.apachefriends.org/en/xampp-windows.html) at ‘C:\xampp‘ (and NOT at ‘C:\Program Files\xampp\‘ or similar!) by unzipping it there.

2. Check for ‘httpd.conf‘ file at ‘C:\xampp\apache\conf‘ and
change

# Virtual hosts
#Include "conf/extra/httpd-vhosts.conf"

to

# Virtual hosts
Include "conf/extra/httpd-vhosts.conf"

only, if the “#” was in that row!

3. Now open ‘httpd-vhosts.conf‘ from ‘C:\xampp\apache\conf\extra‘ and add these lines

<VirtualHost *:80>
 ServerAdmin rahul_37@yahoo.com
 DocumentRoot "C:/xampp/htdocs/drupal"
 ServerName rvishwakarma.localhost
 ServerAlias www.rvishwakarma.localhost
 ErrorLog "logs/rvishwakarma.localhost-error.log"
 CustomLog "logs/rvishwakarma.localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
 ServerAdmin rahul_37@yahoo.com
 DocumentRoot "C:/xampp/htdocs/drupal"
 ServerName luhar.localhost
 ServerAlias www.luhar.localhost
 ErrorLog "logs/luhar.localhost-error.log"
 CustomLog "logs/luhar.localhost-access.log" common
</VirtualHost>

4. Restart your web server.

5. Now open file ‘%windir%\system32\drivers\etc\hosts‘ and append these 4 lines at end of file

127.0.0.1 rvishwakarma.localhost
127.0.0.1 luhar.localhost
127.0.0.1 www.rvishwakarma.localhost
127.0.0.1 www.luhar.localhost

6. Now download the latest “Drupal 7” recommended release (https://drupal.org/project/drupal),
create a folder name “drupal” inside ‘C:\xampp\htdocs\
and put all content of this drupal release in this folder.

7. Create 2 databases for 2 drupal sites with name rvishwakarma and luhar

 PHP Admin:: http://127.0.0.1/phpmyadmin/

8. Create 2 folder name

a.) rvishwakarma.localhost
and
b.) luhar.localhost
inside of 'C:\xampp\htdocs\drupal\sites\'

9. Copy the file C:\xampp\htdocs\drupal\sites\default\default.settings.php into both the subdirectory you created in the previous step. Rename these new files to settings.php.

10.  Open the following URL and go through the standard settings

a.) http://rvishwakarma.localhost/
and
b.) http://luhar.localhost/
and install them as standard drupal installation process (http://drupal.org/documentation/install).

Now Drupal “multisite installation” is done, visit the above URL to open the web page.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s