Comments

In step 1) I created one database for each drupal install, and then one table prefix for each domain that is working under that install. (I will have 3 installs of 2-4 sites each.)
2) create a directory for each site /sites/site1, /sites/site2 ...
4) Copy the file into each directory and rename it as suggested making sure it has write permission for user. (make sure that the directory does too 744?)
5) I use my hosts domain pointer and aim everything at the drupal directory.

... Seems to be working for me... On my 15th attempt.

PS The /sites/sites.php has no effect on the above and the /sites/default/default.settings.php never gets modified. and if you are going to be working on a site that you dont have the domain for yet you can follow the directions above and in the link to create a directory /sites/site4.com and then edit /sites/site.php with the lines :

$sites = array(
'site4.site1.com' => 'site4.com'
);

and when you point your browser to site4.site1.com it will install a new database table for the new site, and you can work on it until the domain arrives.

but from what i understand if the info below, if you want to access a www.example.com/mysite1 the directory would be sites/example.com/mysite1/ if you create that directory and place the settings.php inside with write permissions and browse www.example.com/mysite1 the install.php should start automatically.

I had a lot of issues until i created the directories and did an install thereby not getting the default/default.settings.php involved.

Ok so I have to say that the directory setup does not work. The sub.domain.com works fine. If you set it up doing domain.com/site all you will get is a Index. So I think the person who started this thread is correct to some degree.
I think what is really needed here is an Apache master. I personally fell it has something to do with the DirectoryIndex.http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex
I just have no Idea how to trouble shoot it, and from the lack of community help on this issue I would think most member dont.
I honestly believe that no one really has an idea how to set up a multi site with sub directories. Sub domains yes, but not sub directories. All the documentation I have read always goes back to the same thing....sub.domains.com

See the thing thats nice about sub directories is you dont need dns. all you need is 192.168.1.1/site and boom....that is if you could get it to work. But like I said....all you can get is a directory index. Its almost as you need to set something to run the php.

The following steps will set up a mutisite install of Drupal 7 on an Ubuntu server. The steps for another *nix distro should be quite similar. The sub sites being created here are not virtual hosts, but are actual sub sites, i.e. mainsite.com/subsite1, mainsite.com/subsite2, etc. Note that virtually everything here requires root access, so either login as root, or preface each command with 'sudo'.

1. Install Drupal 7 in the web root and verify that everything is functioning as it should, especially clean urls and SMTP mail functionality.
2. In the sites directory create a folder with a name that mirrors the web address of the sub site. For example, if the main site were accessible at mainsite.com and the sub site were to be accessed at mainsite.com/site1 then the folder would be created in the sites folder as mainsite.com.site1/.
3. Copy the default settings file at sites/default/default.settings.php to sites/mainsite.com.site1/settings.php.
4. In the sites folder there should be a file called example.sites.php. Copy this to sites.php, keeping it in the sites folder.
5. Edit sites.php and add the following to the end of the file:
$sites['mainsite.com/site1'] = 'mainsite.com.site1';
6. cd up to the web root and create a symbolic link as follows:
ln -s . site1 (this says "create a symbolic link so that when someone calls site1, look right here[.]")
7. In /etc/apache2/sites-enabled/ there should be a default .conf file - something like 000-default. I renamed this to default.conf, but renaming is not essential. But you must now edit this file to include the following lines:
<Directory /var/www/html/site1>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
8. Now restart Apache:
/etc/init.d/apache2 restart
9. Create an empty database for your new D7 site, along with a drupal user, granting permissions to the user for the database: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES. (Note that the last two are not totally necessary, but as the documentation at http://drupal.org/documentation/install/create-database included these, for consistency's sake I also included them).
10. Flush the privileges: FLUSH PRIVILEGES;
11. Now run the install for the new site by opening the install.php script in a browser: http://mainsite.com/site1/install.php
12. If everything has been correctly configured the install process should now begin, ask you for the database name, user and location. Once this is finished, your new sub site should be ready to go.

One additional note: All of the sites will want to use the .htaccess file in the main D7 directory. For this reason, the RewriteBase directives in this .htaccess must be commented out:
# RewriteBase /drupal
# RewriteBase /
Otherwise clean urls will not work.

Thanks for the info. I though by doing what you posted in step 5 would have worked for me but I was wrong. However it was a step I think I was still missing.
When you say FLUSH PRIVILEGES; in step ten....I'm not sure what I'm suppose to do..Thats for the db correct. If that is true it should not effect the url at all.
Most of the configuration you explained I already had, except for step 5. However when I try to go to site.com/newsite I get a drupal page saying page Not found. I can however get site.com.newsite to work. Its almost as if the sites.php is having no effect.
One more question...you state in step 5 to do
$sites['mainsite.com/site1'] = 'mainsite.com.site1';
Should it be
$sites['mainsite.com.site1'] = 'mainsite.com/site1';
I'm not sure for me it matters as I still dont get the end result
The only thing I can get to work is site.com.newsite
Any ideas?

The name starts with zeros to make it first in the collating sequence. The directory sites-enabled is included by a wildcard reference, and processing is in alphabetic order. It establishes a default virtual host to be overriden by in later declarations. If there is no replacement declaration, Apache sends requests to this, the first declaration.

There's a lot of various posts and possibilities here. Here's how I do it:

First of, this is single codebase / seperate database style under Drupal (7.7 core ATM):

1. Create site directory: sites/example.com (include all the necessary settings.php and whatever. From scratch, I usually just copy default and rename it and update the settings.php with the new DB's login info, but however you'd normally do it to set up a new site is fine -- i.e. copy the site/example.com directory from another server... you still probably need to make sure the DB config is correct, etc).

In this way, you do NOT need to use symlinks (or junction if you're on older Windows) and you don't need to mess around with Apache (once you have Drupal working in the first place). If you use some sort of stack installer (Acquia for example), and you are creating your local.example.com site, just rename the site directory to example.com (or move the local DB config the installer puts in the settings.php to the existing settings.php in your example.com directory.

If you want to use separate codebases for the different sub-domains, it's just a matter of editing the sites.php file and creating another sites directory. Remember sites.php is used BEFORE the standard directory scanning, and any configuration found in sites.php will override whatever is discovered in the directory scan. Thame means if you have $sites['my.example.com'] = 'example.com'; in the sites.php file, but also have a sites/my.example.com set up, Drupal 7 will IGNORE the directory and use the sites.php configuration (so my.example.com will resolve to the same site as example.com).