Just by way of example, I happen to have MediaWiki installed on Windows/XP, using Wamp 2.0 (a combined Apache/PHP/mySQL package). WAMP configures Apache as follows:
1. The WAMP root directory is d:\wamp
2. The Apache document root is d:\wamp\www
3. Apache itself is in d:\wamp\bin\apache\Apache2.2.11
4. The main Apache configuration file includes these entries:
Code:
notepad d:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf =>
ServerRoot "d:/wamp/bin/apache/apache2.2.11"
...
ServerName localhost:80
DocumentRoot "d:/wamp/www/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "d:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from 127.0.0.1
Allow from 192.168
</Directory>
...
Include "d:/wamp/alias/*"
The first <Directory /> sets global defaults.
The second <Directory "d:/wamp/www/"> overrides these with explicit settings for the document root (including allowing any client in the 127.0.0.1 or 192.168 address ranges to connect).
The final line, "Include 'd:/wamp/alias/*'", is intended to set up other, virtual web sites.
As it happens, I didn't set up a virtual server, I just created a simple alias. But here's the seperate, Apache include file for my MediaWiki site:
Code:
notepad d:\wamp\alias\tngwiki.conf =>
Alias /tngwiki/ "d:/wamp/www/mediawiki-1.13.3/"
Alias /tngwiki "d:/wamp/www/mediawiki-1.13.3/"
<Directory "d:/wamp/www/mediawiki-1.13.3/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from 127.0.0.1
Allow from 192.168
</Directory>
The principle is the same regardless if you're on Windows or Linux; whether you've got a virtual server or an alias.
'Hope that helps .. PSM