dokuwiki:install_dokuwiki_with_apache

This is an old revision of the document!


DokuWiki - Install DokuWiki with Apache

Install Apache and PHP

Install the Apache web server

sudo apt-get install apache2 -y

Install the necessary PHP components

sudo apt-get install php php-gd php-xml php-json -y

Start and enable Apache

sudo systemctl enable --now apache2

Install DokuWiki

Download the latest version of DokuWiki

For the latest Staple version:

wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz

For the Release Candidate Version:

wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-rc.tgz

Unpack the compressed tar file

tar xvzf dokuwiki-stable.tgz

Move and rename the newly-created directory:

sudo mv dokuwiki-XXX /var/www/html/dokuwiki

NOTE: where XXX is the release number.


Setup the .htaccess file

Copy the sample .htaccess file:

sudo cp /var/www/html/dokuwiki/.htaccess{.dist,}

Change the ownership of the DokuWiki folder

sudo chown -R www-data:www-data /var/www/html/dokuwiki

Configure Apache

At the moment, Apache has no way of knowing about the new installation.

  • To make it aware, create a configuration file for DokuWiki.
sudo vi /etc/apache2/sites-available/dokuwiki.conf

…and populate that file with:

ServerName dokuwiki.example.com
DocumentRoot /var/www/html/dokuwiki
 
AllowOverride All
Require all denied
 
Order allow,deny
Deny from all
 
ErrorLog /var/log/apache2/dokuwiki_error.log
CustomLog /var/log/apache2/dokuwiki_access.log combined

NOTE: If a domain is being used, ensure to change the ServerName option.


Save and close the file.


Enable the new site

sudo a2ensite dokuwiki

Reload the Apache configuration files

sudo systemctl reload apache2

dokuwiki/install_dokuwiki_with_apache.1656613602.txt.gz · Last modified: 2022/06/30 18:26 by 45.89.242.195

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki