diff --git a/README.md b/README.md index 79577ca..754f730 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ On first run, use DokuWiki's [installer](https://www.dokuwiki.org/installer) to * xsendfile configured and enabled * imagemagick installed and enabled * nice URLs via rewriting configured and enabled +* farming support via the [farmer plugin](https://www.dokuwiki.org/plugin:farmer) Note: This image does **not** include a mail server. You need to configure DokuWiki to use an external mail server, this most easily achieved using the [SMTP plugin](https://www.dokuwiki.org/plugin:smtp). @@ -37,6 +38,12 @@ The container runs the standard production php.ini. Some options can be set via Custom PHP configuration values can be set in a `php.ini` file in the storage volume. +## Farming + +This image supports farming via the [farmer plugin](https://www.dokuwiki.org/plugin:farmer). To use it, install the plugin and configure it as described in the plugin documentation. The initial farm configuration is already done in this image. The farm directory is `/storage/farm`. + +Use a reverse proxy to route animal requests to this container. + ## How this image handles user data Besides the obvious page and media data, extensions and configuration need to be persisted over container replacements. diff --git a/root/etc/apache2/conf-available/dokuwiki.conf b/root/etc/apache2/conf-available/dokuwiki.conf index a8e4b80..5ebb937 100644 --- a/root/etc/apache2/conf-available/dokuwiki.conf +++ b/root/etc/apache2/conf-available/dokuwiki.conf @@ -3,7 +3,7 @@ AllowOverride All XSendFile on - XSendFilePath /storage/data/ + XSendFilePath /storage/ diff --git a/root/var/www/html/.htaccess b/root/var/www/html/.htaccess index 626ecbd..a34e80a 100644 --- a/root/var/www/html/.htaccess +++ b/root/var/www/html/.htaccess @@ -1,7 +1,12 @@ # enable rewriting by default - RewriteEngine on +# Support the ! syntax for farm animals +RewriteRule ^!([^/]+)/(.*) $2?animal=$1 [QSA,DPI] +RewriteRule ^!([^/]+)$ ?animal=$1 [QSA,DPI] +Options +FollowSymLinks + +# pretty urls RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] diff --git a/root/var/www/html/inc/preload.php b/root/var/www/html/inc/preload.php index 9025b3d..13230ae 100644 --- a/root/var/www/html/inc/preload.php +++ b/root/var/www/html/inc/preload.php @@ -1,33 +1,35 @@