AllowOverride
Please note The repository of Ubuntu has still the 2018-04-22 version of DokuWiki. This version is not recommended. Please install the newest version of DokuWiki. The instruction below uses a version downloaded directly from dokuwiki.org.
These are instructions on how to install a single DokuWiki under Ubuntu 14.04. Other version installations are discussed below. If you want to install a DokuWiki Farm, follow these instructions and then visit the Farm Page.
Please note that there is a dokuwiki package in the Ubuntu repositories. If you want to use it, please see the Debian install page instead. This article describes the installation of DokuWiki from a tarball. (The Ubuntu and Debian packages follow the Debian directory conventions and that is why different steps are needed when using the Ubuntu/Debian package).
For Ubuntu 16.04 you will want to use libapache2-mod-php7.0 and make sure to install php7.0-xml, php7.0 with apt-get
Upgrading from Ubuntu 14.04 LTS to Ubuntu 16.04 LTS I had to add the following:
This resolved all the issues restoring DokuWiki back to normal prior to the upgrades.
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install apache2 libapache2-mod-php php-xml
sudo a2enmod rewrite
cd /var/www sudo wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz sudo tar xvf dokuwiki-stable.tgz sudo mv dokuwiki-*/ dokuwiki
sudo chown -R www-data:www-data /var/www/dokuwiki
sudo nano /etc/apache2/sites-enabled/000*.conf
Replace
DocumentRoot /var/www/html
with
DocumentRoot /var/www/dokuwiki
/etc/apache2/sites-enabled/000*.conf
, instead create a new file in /etc/apache2/sites-available
sudo touch apache2-dokuwiki.conf
with the following content:
<VirtualHost 127.0.0.1> DocumentRoot /var/www/dokuwiki ServerName localhost </VirtualHost>
sudo a2ensite apache2-dokuwiki
sudo service apache2 reload
sudo nano /etc/apache2/apache2.conf
/var/www/
replaceAllowOverride None
AllowOverride All
sudo service apache2 restart
http://IP-address-of-your-server/install.php
to initially configure your DokuWiki.127.0.0.1/install.php
sudo rm /var/www/dokuwiki/install.php
sudo apt-get install postfix
and configure appropriately
For more information on installing and configuring DokuWiki on Ubuntu, see debian_ubuntu_extras.
This works with Ubuntu 11.04 natty:
sudo apt-get install apache2 libapache2-mod-php5
sudo a2enmod userdir sudo a2enmod rewrite
.htaccess
work, edit /etc/apache2/mods-enabled/userdir.conf
and change the AllowOverride
directive to All
1)/etc/apache2/mods-enabled/php5.conf
sudo service apache2 restart
sudo apt-get install lighttpd sudo apt-get install php5-cgi
tar xvfz dokuwiki.tgz ls -l sudo cp -r dokuwiki/ /var/www/ sudo chown -R www-data:www-data /var/www/dokuwiki
sudo lighttpd-enable-mod fastcgi-php sudo /etc/init.d/lighttpd force-reload
apt list dokuwiki
Check the date, if the date is over a couple months then I would highly recommend stopping here and trying the above methods for installation.
dokuwiki/eoan,now 0.0.20180422.a-2 all [residual-config]
If you insist on using the above package then the steps below will assist getting your installation operational.
Note:
Assuming that you have already installed apache and PHP (see above) and they are operating correctly.
The following commands will require sudo prefix or require you to be su (naughty).
sudo apt install dokuwiki
Folders of interest
The apt package has number of problems which you will need to address:
chown www-data:www-data /usr/share/dokuwiki chown www-data:www-data /usr/share/dokuwiki/* -R chown www-data:www-data /var/lib/dokuwiki chown www-data:www-data /var/lib/dokuwiki/* -R ln -s /var/lib/dokuwiki/data /usr/share/dokuwiki/data ln -s /etc/dokuwiki/license.php /usr/share/dokuwiki/conf/license.php
Create virtual directory for apache
nano /etc/apache2/sites-available/dokuwiki.conf
Alias /dokuwiki /usr/share/dokuwiki <Directory /usr/share/dokuwiki> Options +FollowSymLinks AllowOverride All DirectoryIndex index.php Order allow,deny Allow from all </Directory> AliasMatch ^/dokuwiki/sites/[^/]+$ /usr/share/dokuwiki/ AliasMatch ^/dokuwiki/sites/[^/]+/(.*)$ /usr/share/dokuwiki/$1
Tell apache to enable the virtual folder (Note: use a2dissite to disable).
a2ensite dokuwiki systemctl reload apache2
Open your web browser and configure DokuWiki (You will likely get warnings if you have PHP 7.x).
http://mysite.dyndns.org/dokuwiki/install.php
AllowOverride