「DokuWiki」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎設定: 一部翻訳)
(→‎バックアップ: ディレクトリをフルパスに変更(英語版より))
(3人の利用者による、間の8版が非表示)
1行目: 1行目:
[[Category:オフ]]
+
[[Category:キソフトウェア]]
[[en:Dokuwiki]]
+
[[en:DokuWiki]]
[[es:Dokuwiki]]
+
[[es:DokuWiki]]
[[zh-TW:Dokuwiki]]
+
[[zh-hant:DokuWiki]]
「DokuWiki はユーザーがリッチなドキュメントリポジトリを作成することを可能にする標準規格に準拠した使いやすいウィキです。これは、作成する個人、チームや企業のための環境を提供し、構造化されたデータファイルによりウィキ外でも可読性のあるシンプルで強力な構文を使用して共同を可能とします」
+
[https://www.dokuwiki.org/dokuwiki DokuWiki] はユーザーがリッチなドキュメントリポジトリを作成することを可能にする標準規格に準拠した使いやすいウィキです。DokuWiki は、ドキュメントを作成する個人、共同作業を行うチームや企業のための環境を提供し、シンプルで強力な構文を使用して、ウィキ外でも可読性のある構造化されたデータファイルのを可能とします
   
無制限のページのリビジョン以前のページのバージョンに復元を可能にし、プレーンテキストファイルに格納されたデータは、データベースを必要としません。強力なプラグインアーキテクチャは、コアシステムの拡張・強化することができます。DokuWiki が提供する完全な説明については、機能のセクションを参照してください」"[http://wiki.splitbrain.org/wiki:dokuwiki]
+
「ページは無制限に改訂して以前のバージョンのページいつでも復元することができデータはプレーンテキストファイルに格納されるので、データベースを必要としません。強力なプラグインアーキテクチャは、コアシステムの拡張・強化することができます。DokuWiki が提供する機能の完全な説明は、機能のセクションを参照してください [http://wiki.splitbrain.org/wiki:dokuwiki]
   
言い換えると、DokuWikiはPHPで書かれたウィキであり、何のデータベース必要としません。
+
すなわち、DokuWiki PHP で書かれたウィキであり、何のデータベース必要としません。
   
  +
== はじめに ==
[http://www.dokuwiki.org/ 実行例を見てみたいですか?]
 
  +
DokuWiki は、PHP5.6 以降をサポートする任意の Web サーバー上で動作するはずです。バージョンアップによって要件はときどき変わることがあるので、詳細な要件については、DokuWiki の [https://www.dokuwiki.org/start?id=ja:requirements システム要件のページ] を参照してください。
   
  +
あなたの Web サーバーを守るために、[https://www.dokuwiki.org/start?id=ja:security DokuWiki のセキュリティのページ] の適切なセクションを読むことを強くお勧めします。最も人気のある Web サーバーがカバーされていますが、一般的な指示も記述してあります。
== 初期の注意事項 ==
 
DokuWikiは、PHP5.1.2以降をサポートする任意のWebサーバー上で動作するはずです。要件は時間とともに変化するため、追加の詳細については、DokuWikiの[http://www.dokuwiki.org/requirements requirements page]を参照してください。
 
   
  +
[community] にあるパッケージは DokuWiki を {{ic|/usr/share/webapps/dokuwiki}} に、設定ファイルを {{ic|/etc/webapps/dokuwiki}} に、データファイルを {{ic|/var/lib/dokuwiki/data}} に展開します。また、関連するファイルの所有者を "http" ユーザーに変更します。これで Arch 向けにパッケージ化された人気のウェブサーバーなら問題なく動作するはずです。
あなたのWebサーバのために、[http://www.dokuwiki.org/security DokuWiki's security page]の適切なセクションを読むことを強くお勧めします。最も人気のあるWebサーバがカバーされていますが、一般的な指示もそこに記述してあります。
 
 
The package in [community] unpacks DokuWiki at {{ic|/usr/share/webapps/dokuwiki}} with the configuration files in {{ic|/etc/webapps/dokuwiki}} and the data files in {{ic|/var/lib/dokuwiki/data}}. It also changes the ownership of the relevant files to the "http" user. This should work fine for most popular web servers as packaged for Arch.
 
   
 
== インストール ==
 
== インストール ==
# Webサーバー (例えば、[[Apache]]、 [[nginx]] または [[lighttpd]]) を選んでインストールして、[[PHP]] を設定します。前述したように DokuWikiはデータベース・サーバーを必要としないので、Webサーバを設定するときにこれらのステップスキップできるかもしれせん
+
# Web サーバー (例: [[Apache]]、[[nginx]] または [[lighttpd]]) を選んでインストールして、[[PHP]] を設定します。前述したように DokuWiki はデータベース・サーバーを必要としないので、Web サーバを設定するときにデータベースを設定するステップスキップできま
# [[pacman]] を使用して、[community] の {{Pkg|dokuwiki}} を インストールします。
+
# [[pacman]] を使用して、[community] の {{Pkg|dokuwiki}} をインストールします。
# Webサーバを設定します(以下のセクションを参照)。
+
# Web サーバを設定します (以下のセクションを参照)。
# お好みのWebブラウザで、<nowiki>http://&lt;your-server&gt;/dokuwiki/install.php</nowiki> を開いて、そこからインストールを続行してください。
+
# お好みの Web ブラウザで、<nowiki>http://&lt;your-server&gt;/dokuwiki/install.php</nowiki> を開いて、そこからインストールを続行してください。nginx の場合 URL は <nowiki>http://&lt;your-server&gt;/install.php</nowiki> です
   
別の方法として、tarballからインストールしたい場合は、http://www.dokuwiki.org/Install を読んでください。一般的手順は上記と同様です。pacman を使用する代わりに、[http://www.splitbrain.org/projects/dokuwiki tarballをダウンロード] し、サーバーのドキュメントルート(例えば、{{ic|/srv/http/dokuwiki}})に解凍し、適切なユーザーに、chown してください。(例えば、"http")
+
別の方法として、tarball からインストールしたい場合は、http://www.dokuwiki.org/Install を読んでください。大体の手順は上記と同様です。pacman を使用する代わりに、[http://www.splitbrain.org/projects/dokuwiki tarball をダウンロード] し、サーバーのドキュメントルート (例えば、{{ic|/srv/http/dokuwiki}}) に解凍し、適切なユーザー (例: "http") に、chown してください。
   
 
== 設定 ==
 
== 設定 ==
[[lighttpd]] または [[nginx]] を使用する場合、{{ic|/etc/php/php.ini}} の {{ic|open_basedir}} に dokuwikiディレクトリを含めるように変更する必要があります(php forbids following symbolic links outside of the allowed scope):
+
[[lighttpd]] [[nginx]] を使用する場合、PHP のバージョンが 7 よりも古い場合、{{ic|/etc/php/php.ini}} の {{ic|open_basedir}} に dokuwikiディレクトリを含めるように変更する必要があります (php では許可された範囲外にシンボリックリンクを使うことを禁止しています):
   
 
{{hc|/etc/php/php.ini|<nowiki>
 
{{hc|/etc/php/php.ini|<nowiki>
33行目: 31行目:
 
</nowiki>}}
 
</nowiki>}}
   
また、以下の行をアンコメントします
+
また、以下の行をアンコメントします:
 
{{hc|/etc/php/php.ini|<nowiki>
 
{{hc|/etc/php/php.ini|<nowiki>
 
extension=gd.so
 
extension=gd.so
 
</nowiki>}}
 
</nowiki>}}
Dokuwiki needs this library for resizing images.
 
 
Dokuwiki は画像のサイズ変更のために、このライブラリを必要とします。
 
Dokuwiki は画像のサイズ変更のために、このライブラリを必要とします。
   
 
=== Apache ===
 
=== Apache ===
   
The package should add the file {{ic|/etc/httpd/conf/extra/dokuwiki.conf}} with the following contents:
+
パッケージは以下の内容のファイル {{ic|/etc/httpd/conf/extra/dokuwiki.conf}} を追加します:
   
 
{{bc|
 
{{bc|
55行目: 52行目:
 
}}
 
}}
   
If you are running [https://httpd.apache.org/docs/2.4/upgrading.html Apache 2.4 or newer], you will have to change the following lines:
+
[https://httpd.apache.org/docs/2.4/upgrading.html Apache 2.4 以上] を使っている場合、以下の行を変更する必要があります:
 
{{bc|
 
{{bc|
 
order allow,deny
 
order allow,deny
 
allow from all
 
allow from all
 
}}
 
}}
  +
以下のようにしてください:
to read:
 
 
{{bc|
 
{{bc|
 
Require all granted
 
Require all granted
 
}}
 
}}
   
  +
{{ic|/etc/httpd/conf/httpd.conf}} の末尾に以下の行を記述することで Apache の設定から新しく作成されたファイルを Include してください:
Include the newly created file in the Apache configuration by placing the following line at the end of {{ic|/etc/httpd/conf/httpd.conf}}:
 
 
{{bc|
 
{{bc|
 
Include conf/extra/dokuwiki.conf
 
Include conf/extra/dokuwiki.conf
 
}}
 
}}
   
Make sure the folders {{ic|/etc/webapps/dokuwiki}} and {{ic|/var/lib/dokuwiki}} are owned by user and group "http". You may relocate these directories if you like as long as you update the references in {{ic|/etc/httpd/conf/extra/dokuwiki.conf}} respectively.
+
{{ic|/etc/webapps/dokuwiki}} {{ic|/var/lib/dokuwiki}} フォルダの所有者と所有グループが "http" になっていることを確認してください。ディレクトリは自由に場所を変更できますが、その際は {{ic|/etc/httpd/conf/extra/dokuwiki.conf}} の設定も更新してください。
   
  +
その後 Apache を再起動します:
Afterwards restart Apache:
 
# systemctl restart httpd.service
+
# systemctl restart httpd.service
   
  +
ブラウザで ''dokuwiki/install.php'' スクリプトを開いてインストールを完了してください。
Then finish the installation by running the ''dokuwiki/install.php'' script in your browser.
 
   
=== lighttpd の設定 ===
+
=== lighttpd ===
   
Edit the {{ic|/etc/lighttpd/lighttpd.conf}} file as per the [http://www.dokuwiki.org/install:lighttpd dokuwiki instructions] (might contain updated information).
+
[http://www.dokuwiki.org/install:lighttpd dokuwiki の手順] (情報が更新されている可能性があります) に従って {{ic|/etc/lighttpd/lighttpd.conf}} ファイルを編集してください。
   
Make sure the modules {{ic|mod_access}} and {{ic|mod_alias}} are loaded. If not, load them by adding the following to {{ic|/etc/lighttpd/lighttpd.conf}}:
+
{{ic|mod_access}} {{ic|mod_alias}} モジュールがロードされていることを確認してください。モジュールがロードされていない場合、{{ic|/etc/lighttpd/lighttpd.conf}} に以下を追加することでロードします:
 
{{bc|1=
 
{{bc|1=
 
server.modules += ("mod_access")
 
server.modules += ("mod_access")
 
server.modules += ("mod_alias")
 
server.modules += ("mod_alias")
 
}}
 
}}
{{ic|mod_access}} provides the {{ic|url.access-deny}} command, which we are using from this point.
+
{{ic|mod_access}} {{ic|url.access-deny}} コマンドを使います。
   
  +
以下の行の下に:
Under the line:
 
 
{{bc|1=
 
{{bc|1=
 
$HTTP["url"] =~ "\.pdf$" {
 
$HTTP["url"] =~ "\.pdf$" {
95行目: 92行目:
 
}}
 
}}
   
  +
以下を追加:
add this:
 
 
{{bc|1=
 
{{bc|1=
 
# subdir of dokuwiki
 
# subdir of dokuwiki
111行目: 108行目:
 
}}
 
}}
   
  +
''上記のエントリは DokuWiki に基本的なセキュリティを追加します''。lighttpd は Apache のように .htaccess ファイルは使いません。上記の設定は必須ではありません。
''These entries give some basic security to DokuWiki.'' lighttpd does not use .htaccess files like Apache. You CAN install with out this, but I would NEVER recommend it.
 
   
  +
lighttpd や fastcgi の設定ファイルのどこかにエイリアスを追加します:
 
Add alias somewhere in lighttpd or fastcgi conf file:
 
 
{{bc|1=
 
{{bc|1=
 
alias.url += ("/dokuwiki" => "/usr/share/webapps/dokuwiki/")
 
alias.url += ("/dokuwiki" => "/usr/share/webapps/dokuwiki/")
 
}}
 
}}
   
Restart lighttpd:
+
lighttpd を再起動:
# systemctl restart lighttpd
+
# systemctl restart lighttpd
   
 
=== nginx ===
 
=== nginx ===
   
  +
{{Pkg|php-fpm}} をインストールして[[起動]]してください。
{{ic|/etc/nginx/nginx.conf}} に以下の location ブロックを追加します。
 
   
  +
以下の server ブロックを追加してください。ただしサーバーの名前は適当な名前に置き換えてください。DokuWiki のインストールが完了したら install.php のブロックはコメントアウトしてください。以下のブロックは TLS を使用します [https://www.dokuwiki.org/install:nginx]:
#Assuming that the root is set to /usr/share/webapps.
 
  +
{{hc|/etc/nginx/nginx.conf|<nowiki>
#You may need to adjust your location blocks accordingly.
 
  +
server {
location ~^/dokuwiki/(data|conf|bin|inc)/ { deny all; } # secure DokuWiki
 
  +
listen 443 ssl http2;
location ~^/dokuwiki/\.ht { deny all; } # also secure the Apache .htaccess files
 
  +
listen [::]:443 ssl http2;
location ~^/dokuwiki/lib/^((?!php).)*$ { expires 30d; } # no need to serve non .php files through fastcgi, so we catch those requests here.
 
  +
server_name wiki.example.com;
location ~^/dokuwiki/.*\.php$ {
 
include fastcgi.conf;
+
  +
root /usr/share/webapps/dokuwiki;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
 
}
+
index doku.php;
   
  +
#Remember to comment the below out when you're installing DokuWiki, and uncomment it when you're done.
nginx を再起動
 
  +
location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } # secure Dokuwiki
# systemctl restart nginx
 
  +
  +
location ~^/\.ht { deny all; } # also secure the Apache .htaccess files
  +
location @dokuwiki {
  +
#rewrites "doku.php/" out of the URLs if you set the userewrite setting to .htaccess in dokuwiki config page
  +
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
  +
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
  +
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
  +
rewrite ^/(.*) /doku.php?id=$1&$args last;
  +
}
  +
  +
location / { try_files $uri $uri/ @dokuwiki; }
  +
location ~ \.php$ {
  +
try_files $uri =404;
  +
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
  +
fastcgi_index index.php;
  +
include fastcgi.conf;
  +
}
  +
  +
}
  +
</nowiki>}}
  +
  +
nginx を再起動:
  +
# systemctl restart nginx
  +
  +
=== SVG ファイルのアップロードと表示を有効化 ===
  +
DokuWiki は SVG ファイルに対応していますがデフォルトでは無効になっています。
  +
  +
有効にしたい場合、以下のファイルを作成してください:
  +
  +
{{hc|/etc/webapps/dokuwiki/mime.local.conf|
  +
svg image/svg+xml
  +
}}
  +
  +
上記の設定はセキュリティ上問題があります。[https://github.com/splitbrain/dokuwiki/issues/1045#issuecomment-90226230 こちら] を参照。
   
 
== インストール後の作業 ==
 
== インストール後の作業 ==
 
=== 不要なファイルの削除 ===
 
=== 不要なファイルの削除 ===
  +
'''サーバーを設定した後は install.php ファイルを削除してください!''':
'''After configuring the server remove the install.php file!'''
 
# rm /srv/http/dokuwiki/install.php
+
# rm /usr/share/webapps/dokuwiki/install.php
   
 
=== プラグインのインストール ===
 
=== プラグインのインストール ===
  +
[http://www.dokuwiki.org/plugins こちら] にコミュニティによって作成されたプラグインが多数記載されています。
Many community created plugins can be found [http://www.dokuwiki.org/plugins here]
 
   
  +
ウェブインターフェイスを使って管理者メニューからプラグインを追加 (更新) できます。プラグインによっては ssl を通すとダウンロードできないことがあります (例: git)。
They can be added through the web interface (as well as updated) through the Admin menu. Some plugins cannot be downloaded, if they go over ssl (e.g. git). Uncomment following line in {{ic|/etc/php/php.ini}}:
 
{{bc|1=
 
extension=openssl.so
 
}}
 
   
 
=== バックアップ ===
 
=== バックアップ ===
  +
データベースが存在しないため DokuWiki のバックアップはとても簡単です。全てのページはプレーンテキストで保存されているため、[[tar]] や [[rsync]] などでバックアップできます。
It is very trivial to backup DokuWiki, since there is no database. All pages are in plain text, and require only a simple tar, or rsync.
 
  +
  +
最新バージョン (2015-08-10a) で使われているディレクトリの簡単な解説:
  +
/usr/share/webapps/dokuwiki/data/ => ユーザーが作成した全てのデータ
  +
/usr/share/webapps/dokuwiki/conf/ => 設定
   
  +
将来的に上記のディレクトリは変わる可能性があります。[https://www.dokuwiki.org/faq:backup DokuWiki Backup FAQ] を参照してください。
A quick breakdown of the directories of interest in the current (2008-05-05) version:
 
/dokuwiki/data/ => All User Created Data
 
/dokuwiki/lib/plugins/ => All User Added Plugins
 
   
 
== 参考文献 ==
 
== 参考文献 ==
   
The [http://www.dokuwiki.org/ DokuWiki main site] has all of the information and help that you could possibly need.
+
[http://www.dokuwiki.org/ DokuWiki のメインサイト] にはあなたが必要としている全ての情報が記載されています。

2020年7月7日 (火) 14:45時点における版

DokuWiki はユーザーがリッチなドキュメントリポジトリを作成することを可能にする、標準規格に準拠した使いやすいウィキです。DokuWiki は、ドキュメントを作成する個人、共同作業を行うチームや企業のための環境を提供し、シンプルで強力な構文を使用して、ウィキ外でも可読性のある構造化されたデータファイルの作成を可能とします。」

「ページは無制限に改訂して以前のバージョンのページにいつでも復元することができ、データはプレーンテキストファイルに格納されるので、データベースを必要としません。強力なプラグインアーキテクチャは、コアシステムの拡張・強化をすることができます。DokuWiki が提供する機能の完全な説明は、機能のセクションを参照してください。」 [1]

すなわち、DokuWiki は PHP で書かれたウィキであり、何のデータベースも必要としません。

はじめに

DokuWiki は、PHP5.6 以降をサポートする任意の Web サーバー上で動作するはずです。バージョンアップによって要件はときどき変わることがあるので、詳細な要件については、DokuWiki の システム要件のページ を参照してください。

あなたの Web サーバーを守るために、DokuWiki のセキュリティのページ の適切なセクションを読むことを強くお勧めします。最も人気のある Web サーバーがカバーされていますが、一般的な指示も記述してあります。

[community] にあるパッケージは DokuWiki を /usr/share/webapps/dokuwiki に、設定ファイルを /etc/webapps/dokuwiki に、データファイルを /var/lib/dokuwiki/data に展開します。また、関連するファイルの所有者を "http" ユーザーに変更します。これで Arch 向けにパッケージ化された人気のウェブサーバーなら問題なく動作するはずです。

インストール

  1. Web サーバー (例: Apachenginx または lighttpd) を選んでインストールして、PHP を設定します。前述したように DokuWiki はデータベース・サーバーを必要としないので、Web サーバを設定するときにデータベースを設定するステップはスキップできます。
  2. pacman を使用して、[community] の dokuwiki をインストールします。
  3. Web サーバーを設定します (以下のセクションを参照)。
  4. お好みの Web ブラウザで、http://<your-server>/dokuwiki/install.php を開いて、そこからインストールを続行してください。nginx の場合 URL は http://<your-server>/install.php です。

別の方法として、tarball からインストールしたい場合は、http://www.dokuwiki.org/Install を読んでください。大体の手順は上記と同様です。pacman を使用する代わりに、tarball をダウンロード し、サーバーのドキュメントルート (例えば、/srv/http/dokuwiki) に解凍し、適切なユーザー (例: "http") に、chown してください。

設定

lighttpdnginx を使用する場合、PHP のバージョンが 7 よりも古い場合、/etc/php/php.iniopen_basedir に dokuwiki のディレクトリを含めるように変更する必要があります (php では許可された範囲外にシンボリックリンクを使うことを禁止しています):

/etc/php/php.ini
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/dokuwiki/:/var/lib/dokuwiki/

また、以下の行をアンコメントします:

/etc/php/php.ini
extension=gd.so

Dokuwiki は画像のサイズ変更のために、このライブラリを必要とします。

Apache

パッケージは以下の内容のファイル /etc/httpd/conf/extra/dokuwiki.conf を追加します:

Alias /dokuwiki /usr/share/webapps/dokuwiki
<Directory /usr/share/webapps/dokuwiki/>
    Options +FollowSymLinks
    AllowOverride All
    order allow,deny
    allow from all
    php_admin_value open_basedir "/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/dokuwiki/:/var/lib/dokuwiki/"
</Directory>

Apache 2.4 以上 を使っている場合、以下の行を変更する必要があります:

    order allow,deny
    allow from all

以下のようにしてください:

    Require all granted

/etc/httpd/conf/httpd.conf の末尾に以下の行を記述することで Apache の設定から新しく作成されたファイルを Include してください:

Include conf/extra/dokuwiki.conf

/etc/webapps/dokuwiki/var/lib/dokuwiki フォルダの所有者と所有グループが "http" になっていることを確認してください。ディレクトリは自由に場所を変更できますが、その際は /etc/httpd/conf/extra/dokuwiki.conf の設定も更新してください。

その後 Apache を再起動します:

# systemctl restart httpd.service

ブラウザで dokuwiki/install.php スクリプトを開いてインストールを完了してください。

lighttpd

dokuwiki の手順 (情報が更新されている可能性があります) に従って /etc/lighttpd/lighttpd.conf ファイルを編集してください。

mod_accessmod_alias モジュールがロードされていることを確認してください。モジュールがロードされていない場合、/etc/lighttpd/lighttpd.conf に以下を追加することでロードします:

server.modules += ("mod_access")
server.modules += ("mod_alias")

mod_accessurl.access-deny コマンドを使います。

以下の行の下に:

$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"
}

以下を追加:

# subdir of dokuwiki
# comprised of the subdir of the root dir where dokuwiki is installed
# in this case the root dir is the basedir plus /htdocs/
# Note: be careful with trailing slashes when uniting strings.
# all content on this example server is served from htdocs/ up.
#var.dokudir = var.basedir + "/dokuwiki"
var.dokudir = server.document-root + "/dokuwiki"

# make sure those are always served through fastcgi and never as static files
# deny access completly to these
$HTTP["url"] =~ "/(\.|_)ht" { url.access-deny = ( "" ) }
$HTTP["url"] =~ "^" + var.dokudir + "/(bin|data|inc|conf)/"  { url.access-deny = ( "" ) }

上記のエントリは DokuWiki に基本的なセキュリティを追加します。lighttpd は Apache のように .htaccess ファイルは使いません。上記の設定は必須ではありません。

lighttpd や fastcgi の設定ファイルのどこかにエイリアスを追加します:

alias.url += ("/dokuwiki" => "/usr/share/webapps/dokuwiki/")

lighttpd を再起動:

# systemctl restart lighttpd

nginx

php-fpm をインストールして起動してください。

以下の server ブロックを追加してください。ただしサーバーの名前は適当な名前に置き換えてください。DokuWiki のインストールが完了したら install.php のブロックはコメントアウトしてください。以下のブロックは TLS を使用します [2]:

/etc/nginx/nginx.conf
    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        server_name wiki.example.com;
         
        root /usr/share/webapps/dokuwiki;
        index doku.php;

        #Remember to comment the below out when you're installing DokuWiki, and uncomment it when you're done.
        location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } # secure Dokuwiki

        location ~^/\.ht { deny all; } # also secure the Apache .htaccess files
        location @dokuwiki {
            #rewrites "doku.php/" out of the URLs if you set the userewrite setting to .htaccess in dokuwiki config page
            rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
            rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
            rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
            rewrite ^/(.*) /doku.php?id=$1&$args last;
        }

        location / { try_files $uri $uri/ @dokuwiki; }
        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
        }

    }

nginx を再起動:

# systemctl restart nginx

SVG ファイルのアップロードと表示を有効化

DokuWiki は SVG ファイルに対応していますがデフォルトでは無効になっています。

有効にしたい場合、以下のファイルを作成してください:

/etc/webapps/dokuwiki/mime.local.conf
svg image/svg+xml

上記の設定はセキュリティ上問題があります。こちら を参照。

インストール後の作業

不要なファイルの削除

サーバーを設定した後は install.php ファイルを削除してください!:

# rm /usr/share/webapps/dokuwiki/install.php

プラグインのインストール

こちら にコミュニティによって作成されたプラグインが多数記載されています。

ウェブインターフェイスを使って管理者メニューからプラグインを追加 (更新) できます。プラグインによっては ssl を通すとダウンロードできないことがあります (例: git)。

バックアップ

データベースが存在しないため DokuWiki のバックアップはとても簡単です。全てのページはプレーンテキストで保存されているため、tarrsync などでバックアップできます。

最新バージョン (2015-08-10a) で使われているディレクトリの簡単な解説:

/usr/share/webapps/dokuwiki/data/  =>  ユーザーが作成した全てのデータ
/usr/share/webapps/dokuwiki/conf/  =>  設定

将来的に上記のディレクトリは変わる可能性があります。DokuWiki Backup FAQ を参照してください。

参考文献

DokuWiki のメインサイト にはあなたが必要としている全ての情報が記載されています。