compose/mediawiki/README.md
2024-12-29 11:08:26 +08:00

26 lines
799 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MediaWiki
本配置使用 Nginx 作为反向代理,实现了:
* 相对于Apache占用更少的资源
* 安全php 限制 open_basedir
* 缓存,基于 Nginx
* 压缩,基于 opcache
* 伪静态,使用 Nginx 的 rewrite (`/index.php?title=xxx:xxx` -> `/xxx:xxx`)
首先运行容器(详见 [setup.sh](setup.sh)),按照官方流程下载 `LocalSettings.php` 文件。
将官方给出的配置文件内容粘贴到我提供的 [`LocalSettings.php`](LocalSettings.php) 的前面(即以下内容放到官方配置文件的后面)。
```php
$wgScriptPath = "";
$wgArticlePath = "/$1";
$wgResourceBasePath = $wgScriptPath;
```
取消 `# -./LocalSettings.php:/var/www/html/LocalSettings.php` 的注释,重新运行容器。
```shell
docker-compose down
docker-compose up -d
```