I have a problem in multisite with Drupal 7.26. The name of the site is multisite, and the IP is

I created a folder that hosts a new site (/var/www/multisite/sites/site1), copied the settings.php file into the site1 folder; the site1 line is present in the hosts file.

This is the content of /etc/apache2/sites-available/site1.

<VirtualHost *:80>
  ServerAdmin webmaster@localhost 
  ServerName site1
  DocumentRoot /var/www/multisite/sites/site1

  <Directory />
    Options FollowSymLinks
    AllowOverride All

I executed the following commands.

sudo a2ensite site1
sudo /etc/init.d/apache2 reload

If I use, it works; if I use, I get the following error:

The requested URL /site1 was not found on this server. Apache/2.2.22
(Ubuntu) Server at Port 80

What did I do wrong?

should i add any redirect base code in .htaccess file?

    Solution: Give Symbolic link form mulitsite to site2
    Executed that command line 
    ln -s /var/www/multisite /var/www/site2

    Rename example.sites.php to sites.php

    $sites[''] = 'site1';

    put this line in sites.php 

I got a result . Thanks for post the answers this questions

Reference URL:

  • I think you forgot to restart Apache: sudo service apache2 restart.
    – shrish
    Commented Feb 18, 2014 at 11:00
  • sudo /etc/init.d/apache2 reload has the same effect on vhost config
    – Clive
    Commented Feb 18, 2014 at 11:03
  • Troubleshooting Drupal multi site may be painfull. If you have a terminal to the server, you may have try strace , which gives you you a better idea of how Drupal reads your filesystem see more here drupal.stackexchange.com/a/123231/13760
    – Augusto
    Commented Jul 11, 2014 at 13:13

4 Answers 4


The new site vhost should be pointing to the drupal root installation where the index file lives and the entry point for all your sites, not to the site1 folder. "DocumentRoot /var/www/multisite" this should be the same for all your sites.

With multi-site a approach you can shared modules between sites (those in all folder), have different modules per site, you can have different databases per site and share tables between them.

Your drupal sites are going to share the same code base, One drupal core for everyone.

This can be useful https://drupal.org/documentation/install/multi-site


I think you have a whole bunch of things going wrong here.

You need to turn on name based virtual hosts in your httpd.conf:

NameVirtualHost *:80

Then you need to configure your virtual host to respond to these names and map them to the base of your installation

<VirtualHost *:80>
  ServerAdmin webmaster@localhost 
  ServerName site1
  ServerAlias site2, site3, site4
  DocumentRoot /var/www/multisite

  <Directory /var/www/multisite>
    Options FollowSymLinks
    AllowOverride All

Don't forget to restart apache.

Now, you need to configure your DNS or /etc hosts to map these hostnames to an IP address site1 site2 site3 site4

Now you are ready for multisite. Edit the various settings files, and keep in mind that

  • http://site1 will map to site/site1/settings.php
  • http://site2 will map to site/site2/settings.php
  • http://site3 will map to site/site3/settings.php
  • http://site4 will map to site/site4/settings.php

Then you need to browse by the server name and not IP. You may also want to real about multisite aliasing.

All of that said, avoid multisite. It causes more headaches that it is worth.

<VirtualHost *:80>

 ServerAdmin webmaster@localhost 
  ServerName site1
  DocumentRoot /var/www/multisite        //change this to your site root folder 

  <Directory />
    Options FollowSymLinks
    AllowOverride All

Try this.

You may also need to configure your host file if you need aliasing.

  • Please reboot apache after making changes Commented Feb 18, 2014 at 11:34
  • Thanks for your Help.i changed /var/www/multisite/sites/site1 to /var/www/multisite .But i got same 404 error . Commented Feb 18, 2014 at 12:32


Any way I find out the solution . I gave write permission to Symbolic link folder and root folder

  lrwxrwxrwx  1 root       root        44 Feb 19 04:39 mmultisite01 -> /var/www/vhosts/vyhub.com/httpdocs/mmultisite

 mmultisite01 is in root .  So that got errror was 

 You do not have permission to access this document. 

 That root is changed to 

 chown -h vydevplesk:psacln /var/www/vhosts/vyhub.com/httpdocs/mmultisite01

 ls -l

  lrwxrwxrwx  1 vydevplesk psacln      45 Feb 26 05:20 mmultisite01 -> /var/www/vhosts/vyhub.com/httpdocs/mmultisite

  This link is help to me 


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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