DokuWiki

It's better when it's simple

User Tools

Site Tools


install:debian

This is an old revision of the document!


DokuWiki package for Debian

DokuWiki is available in the official Debian repository and is installable through the usual Debian tools.

Installation

All one has to know is written here. For more information on installing and configuring Dokuwiki on Debian, see debian_ubuntu_extras.

Further Configuration of DokuWiki via the Configuration Manager

See →config, the most nearby options being use rewrite and use slash.

The Extension Managers directory isn't writable. If you want to use this function, set the permissions accordingly.

lighttpd

apt-get update	 
apt-get install lighttpd	 
apt-get install php5-cgi php5 dokuwiki	 
lighty-enable-mod fastcgi fastcgi-php dokuwiki	 
/​etc/​init.d/​lighttpd force-reload	 
(If the docuwiki mod fails to load, you may need to create a link to lighttpd.conf. See https://www.dokuwiki.org/install:lighttpd

nginx

Insert in /etc/nginx/sites-enabled/default

    # serve static files from nginx
    location ~ ^/dokuwiki/lib/.+\.(css|gif|js|png)$ {
        root /usr/share;
        expires 30d;
    }
    location = /dokuwiki/install.php {
        deny all;
    }
    location = /dokuwiki {
        rewrite ^ /dokuwiki/ permanent;
    }
    location = /dokuwiki/ {
        rewrite ^ /dokuwiki/doku.php last;
        expires 30d;
    }
    location ~ ^/dokuwiki/(|lib/(exe|plugins/[^/]+)/)[^/]+\.php {
        root /usr/share;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        include        fastcgi_params;
        # from Debian Jessie, replace the previous include by
        include snippets/fastcgi-php.conf;
    }
    location /dokuwiki/ {
        deny all;
    }

Apache

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

After you answer yes to the prompt twice, PHP will install itself.

It may also be useful to add php to the directory index, to serve the relevant php index files:

sudo nano /etc/apache2/mods-enabled/dir.conf

Add index.php to the beginning of index files. The page should now look like this:

<IfModule mod_dir.c>

          DirectoryIndex index.php index.html index.cgi index.pl index.php index.xhtml index.htm

</IfModule>

All one has to do is already done through the Dokuwiki package and it's built in postinstallation routines. /etc/dokuwiki/apache.conf got linked:

ls -l /etc/apache2/conf-available/
lrwxrwxrwx 1 root root   25 Apr  5  2014 dokuwiki.conf -> /etc/dokuwiki/apache.conf
 
ls -l /etc/apache2/conf-enabled/
lrwxrwxrwx 1 root root   32 Apr  5  2014 dokuwiki.conf -> ../conf-available/dokuwiki.conf
  • change Alias and Allow from localhost 127.0.0.1 ::1 to your needs; the default allows only viewing from the host running dokuwiki, and Allow from all will allow viewing from any remote host.
install/debian.1456770315.txt.gz · Last modified: 2016-02-29 19:25 by 2602:306:ced3:af80::49

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki