DokuWiki

It's better when it's simple

User Tools

Site Tools


install:debian

This is an old revision of the document!


yyxyxyx,m

DokuWiki package for Debian

DokuWiki is available in the official Debian repository, excluding Stretch, and is able to be installed 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 DokuWiki mod fails to load, you may need to create a link to lighttpd.conf. See 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 dokuwiki

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

If you're just seeing an 'It works!' page or similar, ensure that the default index.html has been removed from the site directory. If you are still having trouble it may also be useful to move index.php to the beginning of the directory index, This will make sure the index.php file is served first:

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

Note: nano is simply a text editing tool, use whatever you're comfortable with

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

Within the Apache config file (dokuwiki.conf or apache.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.1507140149.txt.gz · Last modified: 2017-10-04 20:02 by 78.99.42.228

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