Benutzer-Werkzeuge

Webseiten-Werkzeuge


server:dokuwiki

Dokuwiki unter Debian 6.0

Voraussetzungen: Apache 2.2 mit PHP 5.

Installation

  • Paket einspielen:
# apt-get install dokuwiki
Wiki location: /wiki
Web servers: [*] apache2
Purge pages on package removal? No

Apache-Konfiguration

  • Website konfigurieren (Subdomain wiki.disorganized.de wird umgeleitet nach disorganized.de/wiki, Wiki-Zugriff erfolgt SSL-gesichert):
# vi /etc/apache2/sites-available/disorganized
<VirtualHost *:443>
[...]
    <IfModule mod_rewrite.c>
[...]
        # https://wiki.disorganized.de/... -> https://disorganized.de/wiki/...
        RewriteCond %{HTTP_HOST} ^wiki.disorganized.de$ [NC]
        RewriteRule . https://disorganized.de/wiki{REQUEST_URI} [R=301,L]
    </IfModule>
</VirtualHost>

<VirtualHost *:80>
    ServerName wiki.disorganized.de
    Redirect permanent / https://disorganized.de/wiki/
</VirtualHost>
  • Apache-Konfigurationsschnippsel von Dokuwiki anpassen (Optionen und Zugriff):
# vi /etc/dokuwiki/apache.conf
Alias /wiki             /usr/share/dokuwiki
<Directory /usr/share/dokuwiki/>
        ## You should disable Indexes and MultiViews either here or in the
        ## global config. Symlinks maybe needed for URL rewriting.
        Options -Indexes -MultiViews +FollowSymLinks
        AllowOverride All
        order allow,deny
        allow from All
</Directory>

DokuWiki-Konfiguration

  • Lokale Dokuwiki-Konfiguration erzeugen (basierend auf /etc/dokuwiki/local.php.local):
# vi /etc/dokuwiki/local.php
<?php

/* Datastorage and Permissions */
$conf['lang']        = 'de';              //your language
$conf['allowdebug']  = 0;                 //make debug possible, disable after install! 0|1

/* Display Options */
$conf['title']       = 'Disorganized Wiki';  //what to show in the title
$conf['breadcrumbs'] = 0;                 //how many recent visited pages to show
$conf['youarehere']  = 1;                 //show "You are here" navigation? 0|1

/* Authentication Options - read http://www.splitbrain.org/dokuwiki/wiki:acl */
$conf['useacl']      = 1;                //Use Access Control Lists to restrict access?
$conf['openregister']= 0;                //Should users to be allowed to register?
$conf['autopasswd']  = 0;                //autogenerate passwords and email them to user
$conf['defaultgroup']= 'user';           //Default groups new Users are added to
$conf['superuser']   = '@admin';         //The admin can be user or @group
$conf['profileconfirm'] = '1';           //Require current password to confirm changes to user profile

/* Advanced Options */
$conf['updatecheck'] = 0;                //automatically check for new releases?
$conf['userewrite']  = 1;                //this makes nice URLs: 0: off 1: .htaccess 2: internal
$conf['useslash']    = 0;                //use slash instead of colon? only when rewrite is on
$conf['gzip_output'] = 1;                //use gzip content encodeing for the output xhtml (if allowed by browser)
$conf['rss_type']    = 'atom';           //type of RSS feed to provide, by default:
                                         //  'rss'  - RSS 0.91
                                         //  'rss1' - RSS 1.0
                                         //  'rss2' - RSS 2.0
                                         //  'atom' - Atom 0.3

/* The following options are usefull, if you use a MySQL
 * database as autentication backend. Have a look into
 * mysql.conf.php too and adjust the options to match
 * your database installation.
 */
//$conf['authtype']   = 'mysql';
//require_once ("mysql.conf.php");

URL-Rewriting

  • Schöne URLs mit SSL-Sicherung:
# vi /usr/share/dokuwiki/.htaccess
[...]
## Uncomment these rules if you want to have nice URLs using
## $conf['rewrite'] = 1 - not needed for rewrite mode 2
RewriteEngine on

# Redirect to SSL
<IfModule mod_ssl.c>
    RewriteCond %{HTTPS} !^on$ [NC]
    RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI}  [R=301,L]
</IfModule>

# Not all installations will require the following line.  If you do,
# change "/dokuwiki" to the path to your dokuwiki directory relative
# to your document root.
RewriteBase /wiki

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]
RewriteRule ^$                        doku.php  [L]
RewriteCond %{REQUEST_FILENAME}       !-f
RewriteCond %{REQUEST_FILENAME}       !-d
RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
RewriteRule ^index.php$               doku.php

Benutzer und Berechtigungen

  • Benutzer ewald mit Admin-Rechten anlegen:
# mkpasswd -H md5
Password:xxx
yyy

#  vi /etc/dokuwiki/users.auth.php
[...]
ewald:yyy:Ewald Dieterich:ewald@disorganized.de:user,upload,admin
  • Berechtigungen setzen:
    • Gruppe ALL für Namensraum * nur auf „Lesen“ setzen.
    • Gruppe user für Namensraum * auf „Lesen, Schreiben, Anlegen“ setzen.
    • Gruppe upload für Namensraum * auf „Lesen, Schreiben, Anlegen, Hochladen, Entfernen“ setzen.
# vi /etc/dokuwiki/acl.auth.php
[...]
*       @ALL    1
*       @user   4
*       @upload 16
  • Privaten Namensraum konfigurieren, auf den nur nach Anmeldung zugegriffen werden kann:
# vi /etc/dokuwiki/acl.auth.php
[...]
privat:*        @ALL          0

Diverses

  • Suchmaschinen ausschließen:
# vi /usr/share/dokuwiki/robots.txt
User-agent: *
Disallow: /
# mv /etc/dokuwiki/acronyms.conf /etc/dokuwiki/acronyms.conf.dist
# > /etc/dokuwiki/acronyms.conf
# touch /etc/dokuwiki/local.php  # purge cache
server/dokuwiki.txt · Zuletzt geändert: 2011/12/11 09:35 von ewald