Hi Platonides,
Thank you for your respond. Our wikis all got different domains. So I tried

/* Global config */
if (strpos($_SERVER['SERVER_NAME'], 'zh.moegirl.org') !== false) {
  require_once("./localsettings_zhmoegirl.php");
} elseif (strpos($_SERVER['SERVER_NAME'], '801girl.org') !== false) {
  require_once("./localsettings_801girl.php");
} else {
  die("No wiki!!");
}
/* Global config */

 I don't know why but one localsettings_xxx.php file contain wrong setting
then all the wiki failed. Also I would like to know will such setting
behave slower than the symbolic link way? I guess php runs slower than
nginx‘s "judge".


On Sun, Apr 27, 2014 at 4:51 PM, Platonides <[email protected]> wrote:

> On 27/04/14 02:01, zoglun wrote:
>
>> Hi everyone,
>> We are holding about seven wikis on one linode serves. We used to
>> create symbolic link under different dir. Unfortunately due to different
>> wiki have different extension, database, and user habits. I can't set a
>> single commonsetting.php for all wikis. We would like to move all the
>> setting files to a common folder. However, nobody knows how to load
>> different localsettings_XXX.php depends on requesting URL. I do read page
>> https://www.mediawiki.org/wiki/Manual:Wiki_family but non of them work. I
>> don't know why.
>>
>> zoglun
>>
>
>
> How are the urls of your different wikis?
>
> A sample snippet based on a working config:
>
> /* Global config */
> if (strpos($_SERVER['SERVER_NAME'], 'foobar.com') !== false) {
>   /* Config wiki 1 */
> } elseif (strpos($_SERVER['SCRIPT_URL'], '/wiki2') === 0) {
>   /* Config wiki 1 */
> } else {
>   die("No wiki!!");
> }
> /* Global config */
>
>
> _______________________________________________
> MediaWiki-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to