Drupal 7 Multisite Install steps in Linux

By

July 24, 2013Drupal1 Comment

As discussed in earlier post  Drupal 7 Multisite install is very interesting topic to work on in both Windows and Linux.

Why Drupal 7 Multisite Install ?

Refer Drupal 7 Multisite Install steps in Windows

Steps for Drupal 7 Multisite install  Linux:

Assuming your web-directory is /var/www/html/

Drupal 7 Multisite Install steps in Windows

 

#1 Once you have decided the multisite, create a folder under sites  refer the above image
For eg:- docs & portal are my new sites, so the sites directory in my Drupal 7 structure will look like below,

Drupal 7 Multisite Install steps in Windows

 

 

#2 Copy the “default.settings.php” from default directory to docs & portal directories.

#3 Once the file has been copied now under sites directory copy “example.sites.php” to “sites.php”

#4 Now your Drupal 7 sites directory will look like above image.

#5 Open “sites.php”  and add the below code at the end.

$sites['exampleportal.com'] = 'portal';
$sites['exampledocs.com'] = 'docs';

Things to remember in Linux:

linux_dir

 

 

 

 

 

> In the above image you can see the owner of the directory is www-data this has to be set before you try to install the site.

#6 The above steps are the only configuration needed from Drupal directory. After all these steps now you have to find “hosts” file in Linux installation. In Linux hosts file will be in this path /etc/hosts. In your hosts file add the below entry at the bottom.

127.0.0.1 exampleportal.com
127.0.0.1 exampledocs.com

#7 Find httpd.conf file in your Linux installation. httpd.conf files will be in /etc/httpd/conf/Open httpd.conf file and add the below line,

    
    NameVirtualHost *:80

    <VirtualHost *:80 >
    DocumentRoot "/var/www/html/"
    ServerName exampleportal.com
    </VirtualHost *:80 >
    <VirtualHost *:80 >
    DocumentRoot "/var/www/html/"
    ServerName exampledocs.com
    </VirtualHost *:80 >

#8 Now you are done will the setup and configuration. Restart your Apache and Reboot your machine.

#9  Once system is rebooted try hitting http://exampleportal.com & http://exampledocs.com in your browser. If something went wrong please recheck your confiuguration from Step #1 to #9

  • Sriraman.V

    .Mydons is providing many useful post …great and keep going ..