настройка MediaWiki для размещения более одной вики

426
hasanghaforian

Я работаю над Ubuntuи не имею опыта в PHPили Apache. Теперь я хочу настроить wiki-family. Поэтому я обратился к официальному Руководству по документам : семья Вики . Есть несколько шагов, чтобы сделать это. Я мог бы сделать первые 5 шагов, но 6-й шаг (Создание LocalSettings.php) имеет две опции, и я не понимаю, что они означают:

  • Если у вас есть разные (суб) домены, которые ссылаются на один каталог на вашем сервере
  • Если ваши вики находятся в одном домене, но по разным путям (например, yourdomain.com/wiki1, yourdomain.com/wiki2 и т. Д.)

Что wikis? Это каталоги? LocalSettings.php? Или же ...?

Также я видел эти варианты здесь :

  • Прежде всего, вы можете иметь вики в разных каталогах или поддоменах, связанных с одним каталогом на нашем сервере.
  • У нас есть разные домены, которые ссылаются на один каталог на вашем сервере

Кажется, последние варианты разные. Что означают эти варианты и как я могу выбирать между ними?

2

2 ответа на вопрос

1
n00b

The point 6 explains that you have two options based in the url that you want to use.

The two options, translated into url's, are:

  1. wiki1.yourdomain.com wiki2.yourdomain.com
  2. yourdomain.com/wiki1 yourdomain.com/wiki2

Wikis are all the wikis that you want to host with only one installation.

In layman's terms, if you follow the official guide you will have:

  • One installation in one directory.
  • Multiple LocalSettings_wiki.php files (one for every wiki)
  • One -and only- LocalSettings.php that will include the modifications explained in the point 6 in Manual:Wiki Family
0
cloneman

It looks like this is a guide to running multiple wiki's out of one directory (folder). It would appear that you can use mediawiki to accomplish this by having multiple LocalSettings_x.php files, defined in a main LocalSettings.php file.

So, you would have a LocalSettings.php file that stores global settings and also points to LocalSettings_wiki1.php and LocalSettings_wiki2.php.

From my understanding, all of these would be in the same directory.

In the case of the virtual subfolder

I don't think Apache needs to be aware, it looks like you can define mydomain.com/wiki1 within the php files, and the wiki will "know" how to handle this.

In the case of subdomain

(wiki1.youromain.com, wiki2.yourdomain.com) Apache config is needed, it needs to be told to point to the proper place, this is accomplished with Apache virtual hosts.

Your case might look something like this:

<VirtualHost *:80> DocumentRoot "/var/www/mediawiki" ServerName wiki1.mydomain.com DocumentRoot "/var/www/mediawiki" ServerName wiki2.mydomain.com </VirtualHost> 

The confusion in this setup you're running everything out of 1 folder, with virtual url paths. For example, a visitor would type mydomain.com/wiki2, but /var/www/wiki2 would not exist on your server, it would be directed behind the scenes as defined by LocalSettings.php

N.B. This is a a theoretical answer to the question, as I have no experience with Mediawiki and limited experience configuring apache. I will edit as needed.

Похожие вопросы