1

I face a problem in multisite with Drupal 7.34. I'm using windows 7 Os. The steps that I followed are:

1. Create a database for all sites : create db of all sites test_db, trial1_db and trial2_db.

2. Install Drupal : I installed the drupal 7.34 as usual and name it test.

3. Tell Windows and Apache about the multiple sites : Open Windows 'hosts' file in a text editor. Which is typically in /system32/drivers/etc/hosts. And add following lines:

                   127.0.0.1 test
                   127.0.0.1 trial1
                   127.0.0.1 trial2

Now in httpd-vhosts.conf file, which is located in c:/xampp/apache/conf/extra. I append these lines at end of the file:

                   NameVirtualHost *:80
                   <VirtualHost *:80>
                     DocumentRoot "C:/xampp/htdocs"
                     ServerName localhost
                   </VirtualHost>

                   <VirtualHost *:80>
                     DocumentRoot "C:/xampp/htdocs/test"
                     ServerName test
                   </VirtualHost>

                  <VirtualHost *:80>
                     DocumentRoot "C:/xampp/htdocs/test"
                     ServerName trial2
                  </VirtualHost>

                  <VirtualHost *:80>
                     DocumentRoot "C:/xampp/htdocs/test"
                     ServerName trial3
                  </VirtualHost>

and make sured that these are not commented in httpd.conf.

                LoadModule rewrite_module modules/mod_rewrite.so
                Include conf/extra/httpd-vhosts.conf

4. Create directories for the sub-sites: Navigate to c:/xampp/htdocs/test/sites and create the directories 'trial1' and 'trial2'. And copy the default-settings.php file to each directory and rename it to settings.php. And also set the permission of these file. I mean these files are not readonly.

5. Install the sub-sites : In an open browser, navigate to http://trial1 or http://trial1/install.php

But here I got "Object Not Found!".

enter image description here

enter image description here

I followed the these links also.

https://www.drupal.org/node/288126

https://www.drupal.org/node/1682040

http://www.dratek.com/node/77

How do I setup multiple sites with one database in Drupal 7

1

Thanks @Sumit Madan for your suggestion. My issue has been resolved now. I just append these lines in test/sites/default/settings.php:

  $sites['trial1.com'] = 'trial1.com';
  $sites['trial1.localhost'] = 'trial1.com';

  $sites['trial2.com'] = 'trial2.com';
  $sites['trial2.localhost'] = 'trial2.com';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.