localhost subsites configuration I know how to install a single instance of Drupal very well but I want to create a number of sub-sites under my Drupal installation.
My file structure is as follows:
drupal7_main
 -sites
   --drupal7_sub1
    settings.php
   --drupal7_sub2
    settings.php

I'm developing on my localhost and the plan is to duplicate the structure on the production server.
However, only drupal7_main works. When I visit localhost/drupal7_main, Drupal is ready and configurable as usual; when I visit localhost/drupal7_sub1, I get the following error.

Not Found
The requested URL /drupal7_sub1 was not found on this server.

I get the same for drupal7_sub2.
I'm trying to learn this process and would appreciate some help.
You need to create symbolic links in order that your drupal7_sub1 and drupal7_sub2 directories works. Those symlinks needs to target your drupal7_main directory.

To create a symlink, open a commandline tool and execute following commands (if your on a Windows machine). You need to put the correct paths depending your localhost configuration.

First go to root directory of your localhost

cd C:/wampp/htdocs/


Create symlink for each subwebsite (drupal7_sub1, drupal7_sub2)

mklink /D drupal7_sub1 C:/wampp/htdocs/drupal7_main
mklink /D drupal7_sub2 C:/wampp/htdocs/drupal7_main


Executing this will already give you a result when visiting localhost/drupal7_sub1. If everything went well, you should see your localhost/drupal7_main website.

Because your working with a localhost URL (and not real domain name, can be a development URL only existing on local, i.e. dev.yourproject.com), you need to slightly adapt your folder structure in order that each subwebsite uses its own settings.php and file folder for the files (uploads, css, ctools, js).

You need to prefix your subfolders under drupal7_main/sites/ with localhost.

drupal7_main/sites/drupal7_sub1 --&gt; drupal7_main/sites/localhost.drupal7_sub1
drupal7_main/sites/drupal7_sub2 --&gt; drupal7_main/sites/localhost.drupal7_sub2