[Mediawiki-l] Multiple wikis using same directory

Joshua Yeidel yeidel at wsu.edu
Fri Oct 27 22:28:19 UTC 2006


I set up a separate add-on to the LocalSettings.php file for each wiki being
served, then include the appropriate add-on using a case statement branching
on host name at the end of the main LocalSettings.php.  I think it's a
little easier to maintain that way than as code buried in LocalSettings.

Note that in this approach, the main LS file has the general settings, then
each specific add-on changes only those settings it needs to change... Kind
of like the way "DefaultSettings.php" and "LocalSettings.php" work together.

Note that the values of some LocalSettings variables are dependent on other
variables, so the order in which they are declared may be significant.

-- Joshua

On 10/27/06 2:55 PM, "Robert Leverington" <lcarsdata at googlemail.com> wrote:

> Thanks, this is exactly what I was looking for :)
> 
> On 27/10/06, Luis Zarrabeitia <kyrie at uh.cu> wrote:
>> 
>> Ah, some other parts of the LocalSettings.php should be made dependant on the
>> $db_lang in my solution, like the upload directory. Sorry about that... and
>> don't forget to point me to a better solution if there is one :D
>> 
>> Cheers,
>> 
>> Zarrabeitia.
>> 
>> On Friday 27 October 2006 12:39, you wrote:
>>> I hope you are not referring to my message "Mediawiki as a CMS." (I mean,
>>> what I did there was a hack, and though it worked for my (en|es).wikipedia
>>> mirror, I wouldn't exactly recommend it).
>>> 
>>> Still, if you are referring to my hack, here it is:
>>> 
>>> I installed a mediawiki in, for instance,
>>> /var/www/sites/wiki
>>> and pointed the en.wikipedia and the es.wikipedia virtualhosts to that
>>> folder.
>>> 
>>> On my localsettings.php,
>>> 
>>> ==============
>> (...)
>>> ================
>>> 
>>> And that seems to work. (the ifs and the $db_lang variable were added by
>>> me). There are some problems with the maintenance scripts in this setup
>>> (they obviously don't define the _SERVER variable so they don't load the
>>> configuration properly so I have to work around that)
>>> 
>>> But given my 0 expertise with mediawiki, I'm sure there is a better way to
>>> do it :D
>>> 
>>> Cheers,
>>> 
>>> Zarrabeitia.
>>> 
>>> On Friday 27 October 2006 05:48, Robert Leverington wrote:
>>>> Someone on here was talking about how to run multiple wikis using the
>>>> same wiki directory, I have a vague idea of how this could be done
>>>> (using a index.php file with exactly the same contents but with a
>>>> different name). But I don't know how I could set up the local
>>>> settings file. When the person said about it I think he used an if
>>>> statement but I don't know how to form one of those which has more
>>>> than two possibilities.
>>>> 
>>>> Thanks,
>> 
>> --
>> Luis Zarrabeitia
>> Fac. de Matemática y Computación, UH.
>> http://profesores.matcom.uh.cu/~kyrie
>> _______________________________________________
>> MediaWiki-l mailing list
>> MediaWiki-l at Wikimedia.org
>> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>> 
> 




More information about the MediaWiki-l mailing list