That's the way I've set up the two wikis I take care of. In this case,
LocalSettings.php is the "traffic cop" redirecting the traffic to the
relevant config file (in this case, wikiALocalSettings.php and
wikiBLocalSettings.php):
Here's my /usr/share/mediawiki/LocalSettings.php :
<?php
$callingURL = strtolower($_SERVER['REQUEST_URI']); //the requesting url
if ( strpos( $callingURL, 'wikiA') ) {
require_once('wikiALocalSettings.php');
}
else if ( strpos( $callingURL, 'wikiB') ) {
require_once('wikiBLocalSettings.php' );
}
?>
Set httpd aliases to /wikiA and /wikiB to the mediawiki installation
directory, like this:
Alias /wikiA /usr/share/mediawiki
<Directory /usr/share/mediawiki>
AllowOverride Options
Options FollowSymLinks
# Short URL
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /wikiA/index.php?title=$1 [PT,L,QSA]
</Directory>
I use the same extension directory for both instances but different
directories for uploads.
Hope it helps
Claude
Dennis Carr a écrit :
Referencing
http://www.mediawiki.org/wiki/Manual:Wiki_family#Scenario_2:_Quick_set-up,
as I understand it, I make my installation, then for each sub-wiki, as
it were, I merely create a copy of the LocalSettings.php file for each
wiki as appropriate, in the root directory - so if the code base is
in /opt/www/wiki, all of the LocalSettings.php copies land here for
each subwiki, with one single LocalSettings.php controlling the whole
show. Is this correct, or did I misread something?