AllowOverride
This is an old revision of the document!
Table of Contents
Installation
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.
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:
- apt-get install php7.0
- apt-get install php-mbstring
- apt-get install php7.0-xml
This resolved all the issues restoring Dokuwiki back to normal prior to the upgrades.
- Install Ubuntu Server 14.04 Step by step instructions with screenshots
- Update & Upgrade Ubuntu.
sudo apt-get update && sudo apt-get upgrade
- Install Apache2 and PHP.
sudo apt-get install apache2 libapache2-mod-php php-xml
- Enable Apache Rewrite module.
sudo a2enmod rewrite
- Download and uncompress the latest stable release.
cd /var/www sudo wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz sudo tar xvf dokuwiki-stable.tgz sudo mv dokuwiki-*/ dokuwiki
- Change permissions.
sudo chown -R www-data:www-data /var/www/dokuwiki
- Change document root in Apache to point to /var/www/dokuwiki
sudo nano /etc/apache2/sites-enabled/000*.conf
Replace
DocumentRoot /var/www/html
with
DocumentRoot /var/www/dokuwiki
- If you want to host a DokuWiki server on localhost for testing purposes do NOT change the content of
/etc/apache2/sites-enabled/000*.conf
, instead create a new file in
/etc/apache2/sites-available
withsudo touch apache2-dokuwiki.conf
with the following content:
<VirtualHost 127.0.0.1> DocumentRoot /var/www/dokuwiki ServerName localhost </VirtualHost>
- enable the new project by placing it into /etc/apache2/sites-enabled with
sudo a2ensite apache2-dokuwiki
- and then reload apache2 service
sudo service apache2 reload
- Change AllowOverrides setting in Apache2 to use .htaccess files for security.
sudo nano /etc/apache2/apache2.conf
- For directory
/var/www/
replace
AllowOverride None
with
AllowOverride All
- Restart Apache2 service.
sudo service apache2 restart
- Visit
http://IP-address-of-your-server/install.php
to initially configure your DokuWiki.- If you decided to host DokuWiki on localhost for testing purposes from point 7a-c, visit
127.0.0.1/install.php
- Delete the install.php file after finished installing.
sudo rm /var/www/dokuwiki/install.php
- Needed for sending email (e.g. user registration): install sendmail program, e.g. postfix
sudo apt-get install postfix
and configure appropriately
- Enjoy your own DokuWiki server.
Additional Installation Information
For more information on installing and configuring Dokuwiki on Ubuntu, see debian_ubuntu_extras.
Apache configuration for running DokuWiki in ~/public_html
This works with Ubuntu 11.04 natty:
- Install apache2 and the php5 module:
sudo apt-get install apache2 libapache2-mod-php5
- Enable the userdir and rewrite modules:
sudo a2enmod userdir sudo a2enmod rewrite
- To make your
.htaccess
work, edit/etc/apache2/mods-enabled/userdir.conf
and change theAllowOverride
directive toAll
1) - By default, php is disabled for user directories. To enable it, comment the lines as per instruction in
/etc/apache2/mods-enabled/php5.conf
- Restart apache with
sudo service apache2 restart
Ubuntu Server 14.04 and lighttpd
- Install lighttpd and php.
sudo apt-get install lighttpd sudo apt-get install php5-cgi
- Download dokuwiki, and place in www directory. Change file name appropriately as your downloaded file is placed and named.
tar xvfz dokuwiki.tgz ls -l sudo cp -r dokuwiki/ /var/www/ sudo chown -R www-data:www-data /var/www/dokuwiki
- Configure lighttpd for php.
sudo lighttpd-enable-mod fastcgi-php sudo /etc/init.d/lighttpd force-reload
- That's it. Enjoy your own DokuWiki server. (Test if it works on your http://localhost/dokuwiki)