{"id":3175,"date":"2018-03-20T15:58:58","date_gmt":"2018-03-20T12:58:58","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/debian-dokuwiki-apache-installation\/"},"modified":"2018-03-20T15:58:58","modified_gmt":"2018-03-20T12:58:58","slug":"how-to-install-dokuwiki-with-apache-on-debian-9","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-dokuwiki-with-apache-on-debian-9\/","title":{"rendered":"How to Install DokuWiki with Apache on Debian 9"},"content":{"rendered":"<p>This tutorial I will show you how to install and configure the latest version DokuWiki CMS platform on Debian 9.2 release, in order to create online documentation websites.<\/p>\n<p>DokuWiki is a free open source wiki application written completely in the PHP programming language and often deployed in Linux under Apache\/Nginx web servers and PHP. <\/p>\n<p>DokuWiki software platform requires no RDBMS SQL database to run. In exchange, it uses simple plain text files as backend in order to store all data. DokuWiki is a simple and flexible platform with a clean syntax that can be successfully used to deploy powerful and collaborative documentation websites.<\/p>\n<h2 id=\"requirements\">Requirements<\/h2>\n<ul>\n<li><span\/>Minimal installation of debian 9 on a bare-metal server machine or on a virtual private server.<\/li>\n<li>sudo root privileges for a local or remote account or direct access to root account.<\/li>\n<li>A static IP address configured for one of your system network interfaces cards.<\/li>\n<li>A domain name, private or public, depending on your deployment, with the proper DNS records configured for web services. If don\u2019t have a valid or a registered domain name you can perform the installation and access the website via your server IP address.<\/li>\n<li>If you want to use website registration, mail order confirmations and other features, you should have a running mail server properly configured at your premises with remote access to its .IMAP and SMTP services.<\/li>\n<\/ul>\n<h2 id=\"prerequirements\">Pre-Requirements<\/h2>\n<p>Before starting to install and configure DokuWiki from sources in your own server, first assure the system meets all the software requirements for compiling and installing the application. In the first step, update your system repositories and software packages by issuing the following command.<\/p>\n<p class=\"command\">apt\u00a0update<\/p>\n<p class=\"command\">apt\u00a0upgrade<\/p>\n<p><strong\/>On the next step, execute the following command in order to install some necessary utilities that will be used to further manage your system from the command line.<\/p>\n<p class=\"command\">apt\u00a0install\u00a0wget\u00a0bash-completion\u00a0zip\u00a0unzip\u00a0curl<\/p>\n<p>After the system has been fully updated and the required utilities to manage your server have been installed, setup the name for your system by executing the following command (replace your hostname variable accordingly).<\/p>\n<p class=\"command\">hostnamectl\u00a0set-hostname\u00a0www.mywiki.com<\/p>\n<p>Verify\u00a0machine\u00a0hostname\u00a0and\u00a0hosts\u00a0file\u00a0by\u00a0issuing\u00a0the\u00a0below\u00a0commands.<\/p>\n<p class=\"command\">hostnamectl\u00a0<\/p>\n<p class=\"command\">cat\u00a0\/etc\/hostname\u00a0<\/p>\n<p class=\"command\">hostname\u00a0\u2013s<\/p>\n<p class=\"command\">hostname\u00a0\u2013f<\/p>\n<p><strong><b>\u00a0<\/b><\/strong>Next,\u00a0install the ImageMagick\u00a0software,\u00a0required\u00a0by\u00a0DokuWiki\u00a0to\u00a0create\u00a0image\u00a0thumbnailing\u00a0by\u00a0issuing\u00a0the following command.<\/p>\n<p class=\"command\">apt\u00a0install\u00a0imagemagick\u00a0<\/p>\n<p>\u00a0Finally,\u00a0reboot\u00a0Debian\u00a0server\u00a0in\u00a0order\u00a0to\u00a0apply\u00a0kernel\u00a0updates\u00a0and\u00a0the\u00a0hostname\u00a0changes\u00a0properly.<\/p>\n<p class=\"command\">init\u00a06<\/p>\n<p>DokuWiki is a web-based CMS wiki platform written in PHP server-side programming language. In order to execute the PHP file scripts of the application, a web server, such as Apache HTTP server, and a PHP processing gateway must be installed and operational in the system.\u00a0 In order to install Apache web server and the PHP interpreter alongside all required PHP modules needed by the application to run properly, issue the following command in your server console.<\/p>\n<p class=\"command\">apt\u00a0install\u00a0apache2\u00a0libapache2-mod-php7.0\u00a0php7.0\u00a0php7.0-curl\u00a0php7.0-gd\u00a0php7.0-opcache\u00a0php7.0-json\u00a0php7.0-mbstring\u00a0php7.0-intl\u00a0php-imagick\u00a0php7.0-xml<\/p>\n<p>After Apache and PHP has been installed, test if the web server is up and running and listening for network connections on port 80 by issuing the following command with root privileges.<\/p>\n<p class=\"command\">netstat\u00a0\u2013tlpn<\/p>\n<p><strong\/>In\u00a0case the <strong><b>netstat<\/b><\/strong>\u00a0network\u00a0utility\u00a0is\u00a0not\u00a0installed by\u00a0default on your\u00a0Debian\u00a0system,\u00a0execute\u00a0the following command\u00a0to\u00a0install\u00a0it.<\/p>\n<p class=\"command\">apt\u00a0install\u00a0net-tools<\/p>\n<p>By inspecting the netstat command output you can see the Apache web server is listening for incoming network connections on port 80. For the same task, you can also use the ss command, which is automatically installed by default in Debian 9.<\/p>\n<p class=\"command\">ss-\u00a0tulpn<\/p>\n<p>In case you have a firewall enabled on your system, such as UFW firewall application, you should add a new rule to allow HTTP traffic to pass through the firewall by issuing the following command.<\/p>\n<p class=\"command\">ufw\u00a0allow\u00a0WWW<\/p>\n<p>or<\/p>\n<p class=\"command\">ufw\u00a0allow\u00a080\/tcp<\/p>\n<p>If you\u2019re using iptables raw rules to manage Firewall rules on your Debian server, add the following rules to allow port 80 inbound traffic on the firewall so that visitors can browse your wiki application.<\/p>\n<p class=\"command\">apt-get\u00a0install\u00a0-y\u00a0iptables-persistent<\/p>\n<p class=\"command\">iptables\u00a0-I\u00a0INPUT\u00a0-p\u00a0tcp\u00a0&#8211;destination-port\u00a080\u00a0-j\u00a0ACCEPT<\/p>\n<p class=\"command\">iptables\u00a0-I\u00a0INPUT\u00a0-p\u00a0tcp\u00a0&#8211;destination-port\u00a022\u00a0-j\u00a0ACCEPT<\/p>\n<p class=\"command\">netfilter-persistent\u00a0save<\/p>\n<p class=\"command\">systemctl\u00a0restart\u00a0netfilter-persistent<\/p>\n<p class=\"command\">systemctl\u00a0status\u00a0netfilter-persistent<\/p>\n<p class=\"command\">systemctl\u00a0enable\u00a0netfilter-persistent.service<\/p>\n<p><strong\/>Next, enable and apply the following Apache module required by the the web application to activate the weboot\u00a0 .htaccess files. Run the following commands:<\/p>\n<p class=\"command\">a2enmod\u00a0rewrite\u00a0<\/p>\n<p class=\"command\">systemctl\u00a0restart\u00a0apache2<\/p>\n<p>Finally, test if the Apache web server default web page can be displayed in your client&#8217;s browsers by visiting your Debian machine IP address or your domain name or server FQDN via HTTP protocol, as shown in the image below. If you don\u2019t know your machine&#8217;s IP address, execute ifconfig or <strong>ip a<\/strong> command\u00a0to reveal the IP address of your server.<\/p>\n<p><span><a href=\"http:\/\/your_domain.tld\" target=\"_blank\" rel=\"noopener\"><span><span>http:\/\/your_domain.tld<\/span><\/span><\/a><\/span>\u00a0<\/p>\n<p><a class=\"fancybox\" id=\"img-Picture1\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture1.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p>In order to install and access DowuWiki web admin panel backend and the frontend website via HTTPS protocol that will secure the traffic for your clients, issue the following command to enable Apache web server SSL module and SSL site configuration file.<\/p>\n<p class=\"command\">a2enmod\u00a0ssl\u00a0<\/p>\n<p class=\"command\">a2ensite\u00a0default-ssl.conf<\/p>\n<p>Next, open Apache default SSL site configuration file with a text editor and enable URL rewrite rules by adding the following lines of code after DocumentRoot directive. Run the following command:<\/p>\n<p class=\"command\">nano\u00a0\/etc\/apache2\/sites-enabled\/default-ssl.conf<\/p>\n<p><strong><em\/><\/strong>SSL\u00a0site\u00a0configuration\u00a0file\u00a0excerpt:<\/p>\n<pre>&lt;Directory\u00a0\/var\/www\/html&gt;<br\/>\u00a0 Options\u00a0+FollowSymlinks<br\/>\u00a0 AllowOverride\u00a0All<br\/>\u00a0 Require\u00a0all\u00a0granted<br\/>&lt;\/Directory&gt;<\/pre>\n<p>Also,\u00a0make\u00a0the\u00a0following\u00a0change\u00a0to\u00a0VirtualHost\u00a0line\u00a0to make it look\u00a0like the way it&#8217;s shown\u00a0in\u00a0the excerpt below:<\/p>\n<pre>&lt;VirtualHost\u00a0*:443&gt;<\/pre>\n<p><strong><a class=\"fancybox\" id=\"img-Picture2\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture2.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-1.png\" alt=\"\" title=\"\"><\/a><\/strong><\/p>\n<p>Close the SSL Apache file and open the \/etc\/apache2\/sites-enabled\/000-default.conf file for editing and add the same URL rewrite rules for SSL configuration file. Insert the lines of code after DocumentRoot statement as shown in the following example.<\/p>\n<pre>&lt;Directory\u00a0\/var\/www\/html&gt;<br\/>\u00a0 Options\u00a0+FollowSymlinks<br\/>\u00a0 AllowOverride\u00a0All<br\/>\u00a0 Require\u00a0all\u00a0granted<br\/>&lt;\/Directory&gt;<\/pre>\n<p><strong><a class=\"fancybox\" id=\"img-Picture3\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture3.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-2.png\" alt=\"\" title=\"\"><\/a><\/strong><\/p>\n<p>Finally, restart Apache daemon to apply all rules configured so far and visit your domain via the HTTP protocol. Because you\u2019re using the automatically Self-Signed certificates pairs issued by Apache at installation, a certificate that is untrusted by the browser, an error warning should be displayed in the browser.<\/p>\n<p class=\"command\">systemctl\u00a0restart\u00a0apache2<\/p>\n<p><span><a href=\"https:\/\/yourdomain.tld\" target=\"_blank\" rel=\"noopener\"><strong><span><b><span>https:\/\/yourdomain.tld<\/span><\/b><\/span><\/strong><\/a><\/span><strong><b>\u00a0<\/b><\/strong><\/p>\n<p><strong><a class=\"fancybox\" id=\"img-Picture4\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture4.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-3.png\" alt=\"\" title=\"\"><\/a><\/strong><\/p>\n<p>Accept the warning in order to accept the untrusted certificate and continue to be redirected to Apache default web page, as illustrated in the image below.<\/p>\n<p><a class=\"fancybox\" id=\"img-Picture5\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture5.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-4.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p>In case the UFW firewall application blocks incoming network connections to HTTPS port, you should add a new rule to allow HTTPS traffic to pass through firewall by issuing the following command.<\/p>\n<p class=\"command\">ufw\u00a0allow\u00a0\u2018WWW\u00a0Full\u2019<\/p>\n<p>or<\/p>\n<p class=\"command\">ufw\u00a0allow\u00a0443\/tcp<\/p>\n<p>If iptables is the default firewall application installed to protect your Debian system at the network level, add the following rule to allow port 443 inbound traffic in the firewall so that visitors can browse your domain name.<\/p>\n<p class=\"command\">iptables\u00a0-I\u00a0INPUT\u00a0-p\u00a0tcp\u00a0&#8211;destination-port\u00a0443\u00a0-j\u00a0ACCEPT<\/p>\n<p class=\"command\">netfilter-persistent\u00a0save<\/p>\n<p class=\"command\">systemctl\u00a0restart\u00a0netfilter-persistent<\/p>\n<p class=\"command\">systemctl\u00a0status\u00a0netfilter-persistent<\/p>\n<p>On the next step, we need to make some further changes to PHP default configuration file in order to assure that the following PHP variables are enabled and the PHP timezone setting is correctly configured and matches your system geographical location.\u00a0 Open \/etc\/php\/7.0\/apache2\/php.ini file for editing and make sure that the following lines are setup as shown. Also, initially, make a backup of the PHP configuration file.<\/p>\n<p class=\"command\">cp\u00a0\/etc\/php\/7.0\/apache2\/php.ini{,.backup}<\/p>\n<p class=\"command\">nano\u00a0\/etc\/php\/7.0\/apache2\/php.ini<\/p>\n<p><strong><b>\u00a0<\/b><\/strong>Search,\u00a0edit\u00a0and\u00a0change\u00a0the\u00a0following\u00a0variables\u00a0in\u00a0<strong><b>php.ini<\/b><\/strong>\u00a0configuration\u00a0file:<\/p>\n<pre><em><i>file_uploads\u00a0=\u00a0On<br\/>default_charset<\/i><\/em> <em><i>=\u00a0UTF-8<br\/>memory_limit\u00a0=\u00a0128M<br\/>max_execution_time\u00a0=\u00a0300<br\/>upload_max_filesize\u00a0=\u00a0100M<br\/>short_open_tag\u00a0=\u00a0Off<br\/>output_buffering\u00a0=\u00a0Off<br\/>output_handler\u00a0=<br\/>zlib.output_compression\u00a0=\u00a0Off<br\/>implicit_flush\u00a0=\u00a0Off<br\/>max_input_time\u00a0=\u00a060<br\/>max_input_vars\u00a0=\u00a010000<br\/>error_reporting\u00a0=\u00a0E_ALL\u00a0&amp;\u00a0~E_NOTICE<br\/>display_startup_errors\u00a0=\u00a0Off<br\/>log_errors\u00a0=\u00a0On<br\/>variables_order\u00a0=\u00a0\u201cEGPCS\u201d<br\/>register_argc_argv\u00a0=\u00a0Off<br\/>session.use_cookies\u00a0=\u00a01<br\/>date.timezone\u00a0=\u00a0Europe\/London<\/i><\/em><\/pre>\n<p>Increase <em>upload_max_file_size<\/em> variable as suitable to support large file attachments and replace the time.zone variable accordingly to your physical time by consulting the list of time zones provided by PHP docs at the following link\u00a0<span><a href=\"http:\/\/php.net\/manual\/en\/timezones.php\" target=\"_blank\" rel=\"noopener\"><span><span>http:\/\/php.net\/manual\/en\/timezones.php<\/span><\/span><\/a><\/span>\u00a0<\/p>\n<p>If you want to increase the load speed of your website pages via OPCache plugin available for PHP7, append the following OPCache settings at the bottom of the PHP interpreter configuration file, as detailed below:<\/p>\n<pre>[opcache]<br\/><em><i>opcache.enable=1 <br\/>opcache.enable_cli=1 <br\/>opcache.interned_strings_buffer=8 <br\/>opcache.max_accelerated_files=10000 <br\/>opcache.memory_consumption=128 <br\/>opcache.save_comments=1<br\/>opcache.revalidate_freq=1<\/i><\/em><\/pre>\n<p>\u00a0Close\u00a0the\u00a0<em>php.ini<\/em>\u00a0configuration\u00a0and\u00a0restart\u00a0apache\u00a0daemon\u00a0to\u00a0apply\u00a0the\u00a0new\u00a0changes\u00a0by\u00a0issuing\u00a0the\u00a0following\u00a0command.<\/p>\n<p class=\"command\">systemctl\u00a0restart\u00a0apache2<\/p>\n<p>Finally, create a PHP info file by executing the following command and check if the PHP time zone has been correctly configured by visiting the PHP info script file from a browser at the following URL, as illustrated in the below image. Scroll down to date setting to check PHP time zone configuration.<\/p>\n<p class=\"command\">echo\u00a0&#8216;&lt;?php\u00a0phpinfo();\u00a0?&gt;&#8217;|\u00a0tee\u00a0\/var\/www\/html\/info.php<\/p>\n<p><span><a href=\"https:\/\/domain.tld\/info.php\" target=\"_blank\" rel=\"noopener noreferrer\"><span><span\/><\/span>https:\/\/domain.tld\/info.php<\/a> <\/span><\/p>\n<p><span><span><span><a class=\"fancybox\" id=\"img-Picture6\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture6.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-5.png\" alt=\"\" title=\"\"><\/a><\/span><\/span><\/span><\/p>\n<h2 id=\"installnbspdokuwikinbsp\">Install\u00a0DokuWiki\u00a0<\/h2>\n<p>After all system requirements are met for installing your wiki documentation CMS, visit DokuWiki official download page at\u00a0<a href=\"https:\/\/download.dokuwiki.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/download.dokuwiki.org\/<\/a> and grab the latest stable zip package compressed archive in your system by issuing the following command.<\/p>\n<p class=\"command\">wget<strong><b>\u00a0<\/b><\/strong><span><a href=\"https:\/\/download.dokuwiki.org\/src\/dokuwiki\/dokuwiki-stable.tgz\" target=\"_blank\" rel=\"noopener\"><span><span>https:\/\/download.dokuwiki.org\/src\/dokuwiki\/dokuwiki-stable.tgz<\/span><\/span><\/a><\/span>\u00a0<\/p>\n<p>After the zip archive download finishes, extract the DokuWiki zip archive file to your current working directory and list the extracted files by issuing the following commands. Also, remove the default index.html file installed by Apache web server to webroot path and also delete the info.php file created earlier.<\/p>\n<p class=\"command\">tar\u00a0xzvf\u00a0dokuwiki-stable.tgz<\/p>\n<p class=\"command\">ls\u00a0<\/p>\n<p class=\"command\">rm\u00a0\/var\/www\/html\/index.html\u00a0<\/p>\n<p class=\"command\">rm\u00a0\/var\/www\/html\/info.php<\/p>\n<p><strong\/>The installation files of DokuWiki are located in your current working directory in dokuwiki-2017-20-19e directory. Issue the ls command to list the extracted directory files. Copy all the content of the extracted directory to your web server document root path by issuing the command below. Also, make sure you copy the hidden file .htaccess to HTTP server webroot path.<\/p>\n<p class=\"command\">ls\u00a0dokuwiki-2017-02-19e\/<\/p>\n<p class=\"command\">cp\u00a0-rf\u00a0dokuwiki-2017-02-19e\/*\u00a0\/var\/www\/html\/<\/p>\n<p class=\"command\">cp\u00a0dokuwiki-2017-02-19e\/.htaccess.dist\u00a0\/var\/www\/html\/<\/p>\n<p><strong\/>Next, execute the following commands in order to grant Apache runtime user with full write permissions to the web root path. Use the ls command to list permissions for application\u2019s installed files located in the \/var\/www\/html\/ directory.<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0www-data:www-data\u00a0\/var\/www\/html\/<\/p>\n<p class=\"command\">ls\u00a0\u2013al\u00a0\/var\/www\/html\/<\/p>\n<p>Next, proceed with DokuWiki installation process by opening a browser and navigate your server\u2019s IP address or domain name or server FQDN via HTTPS protocol and open install.php script.<\/p>\n<p><a href=\"https:\/\/yourdomain.tld\/install.php%20\" target=\"_blank\" rel=\"noopener noreferrer\"><span><span><span>https:\/\/yourdomain.tld<\/span><\/span><\/span><\/a><span><span><a href=\"https:\/\/yourdomain.tld\/install.php%20\" target=\"_blank\" rel=\"noopener noreferrer\">\/install.php <\/a><br \/><\/span><\/span><\/p>\n<p>On the first installation script, add the name of your wiki platform and check Enable ACL. Supply a wiki superuser account name, the real name, and the email address of the superuser account, and choose a strong password to protect the superuser account. <\/p>\n<p>Next, select Public Wiki (read for everyone, write and upload for registered users) as your initial ACL policy and uncheck Allow users to register themselves in order to disable wiki registration process for visitors. Also, select your favorite content license from the presented options and uncheck the option to send anonymous data to DokuWiki developers once a month.<\/p>\n<p>When you finish, hit on Save button to apply the configuration.<\/p>\n<p><a class=\"fancybox\" id=\"img-Picture7\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture7.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-6.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p>On the next screen, the installer will inform you that your previous configurations had been successfully saved to the DokuWiki configuration file located in your web server document root path, and you can delete the installation file.<\/p>\n<p><a class=\"fancybox\" id=\"img-Picture8\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture8.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-7.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p>Before logging in to your wiki CMS backend admin panel, return to the server console and issue the following commands to delete the installation file and secure DokuWiki system configuration files.<\/p>\n<p class=\"command\">rm\u00a0-rf\u00a0\/var\/www\/html\/install.php<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0root:root\u00a0\/var\/www\/html\/<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0www-data:root\u00a0\/var\/www\/html\/data\/<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0www-data:root\u00a0\/var\/www\/html\/lib\/plugins\/<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0www-data:root\u00a0\/var\/www\/html\/lib\/tpl\/<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0www-data:root\u00a0\/var\/www\/html\/conf\/local.php*<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0www-data:root\u00a0\/var\/www\/html\/conf\/users.auth.php<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0www-data:root\u00a0\/var\/www\/html\/conf\/acl.auth.php<\/p>\n<p class=\"command\">chown\u00a0-R\u00a0www-data:root\u00a0\/var\/www\/html\/conf\/plugins.local.php*<\/p>\n<p>In order to visit your wiki application frontend, just navigate to your server IP address or domain name via HTTPS protocol and the default DokuWiki will be displayed as illustrated in the below screenshot.<\/p>\n<p><span><a href=\"https:\/\/yourdomain.tld\" target=\"_blank\" rel=\"noopener\"><span><span\/><\/span><\/a><a href=\"https:\/\/yourdomain.tld\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/yourdomain.tld <\/a><\/span><\/p>\n<p><span><span><span><a class=\"fancybox\" id=\"img-Picture9\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture9.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-8.png\" alt=\"\" title=\"\"><\/a><\/span><\/span><\/span><\/p>\n<p>To manage the DokuWiki platform, click on top Log In link and use the credentials configured during the installation process in order to log in to DokuWiki backend admin panel &#8211; as shown in the screenshot below.<\/p>\n<p><a class=\"fancybox\" id=\"img-Picture10\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture10.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-9.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p>To further configure your wiki platform, hit on top Admin button and use the Administration links to manage users, ACL, extensions, template style settings or other custom settings.<\/p>\n<p><a class=\"fancybox\" id=\"img-Picture11\" href=\"https:\/\/www.howtoforge.com\/images\/install_dokuwiki_in_debian_92\/big\/Picture11.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-dokuwiki-with-apache-on-debian-9-10.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p>Finally, to force visitors to browse the wiki website and to securely access the backend interface via HTTPS protocol in order to encrypt the traffic between the server and client browsers, return to your server\u2019s terminal and open the .htaccess file located in your website document root path, by issuing the following commands.<\/p>\n<p class=\"command\">cp\u00a0\/var\/www\/html\/.htaccess.dist\u00a0\/var\/www\/html\/.htaccess<\/p>\n<p class=\"command\">nano\u00a0\/var\/www\/html\/.htaccess<\/p>\n<p>Then, edit the .htaccess file and at the bottom of the file, you can change the native PHP server settings with the below configurations. Modify the PHP settings to match your own server resources and configurations.<\/p>\n<p><strong><b>\u00a0.htaccess<\/b><\/strong>\u00a0file\u00a0excerpt:<\/p>\n<pre>#\u00a0Modify\u00a0PHP\u00a0settings<br\/><em><i>php_value\u00a0session.use_trans_sid\u00a00<br\/>php_value\u00a0register_globals\u00a01<br\/>php_value\u00a0upload_max_filesize\u00a0100M<br\/>php_value\u00a0post_max_size\u00a0100M<\/i><\/em><\/pre>\n<p>Finally,\u00a0add\u00a0the following rules\u00a0in the .htaccess\u00a0file\u00a0in\u00a0order\u00a0to\u00a0automatically\u00a0redirect\u00a0domain\u00a0traffic\u00a0to\u00a0HTTPS.<\/p>\n<pre readability=\"4\"><em><i>#\u00a0Redirect\u00a0to\u00a0HTTPS\u00a0for\u00a0all\u00a0pages\u00a0including\u00a0the\u00a0main\u00a0web\u00a0page<br\/><\/i><\/em><em readability=\"2\"><i>&lt;IfModule\u00a0mod_rewrite.c&gt;<br\/>RewriteEngine\u00a0On<br\/>RewriteCond\u00a0%{HTTPS}\u00a0off<br\/>RewriteRule\u00a0(.*)\u00a0https:\/\/%{SERVER_NAME}\/$1\u00a0[R,L]<\/i><p>Options\u00a0-Indexes<br\/>&lt;\/IfModule&gt;<\/p><\/em><\/pre>\n<p><strong><em><b><i>\u00a0<\/i><\/b><\/em><\/strong>In case you want to redirect to https only the login, profile and admin pages, replace the above redirect rules with the ones shown below. In this case, the main page of your wiki website will not be redirected to https protocol.<\/p>\n<pre><em><i>#\u00a0Switch\u00a0to\u00a0HTTPS\u00a0on\u00a0login,\u00a0profile\u00a0and\u00a0admin\u00a0actions<br\/><\/i><\/em><em><i>RewriteEngine\u00a0On<br\/>RewriteCond\u00a0%{HTTPS}\u00a0!on<br\/>RewriteCond\u00a0%{QUERY_STRING}\u00a0do=(log|profile|admin)<br\/>RewriteRule\u00a0^(.*)\u00a0https:\/\/%{HTTP_HOST}\/$1\u00a0[R,QSA,L,NE]<\/i><\/em><\/pre>\n<p>That\u2019s all! You have successfully installed and configured DokuWiki platform in Debian 9.2. However, because the Apache HTTP server uses Self-Signed certificates to encrypt the traffic between the server and visitors&#8217; browsers, a warning message will always be generated and displayed in their browsers. This warning is bad for your website reputation and SEO. In this case, you should buy a certificate issued by a trusted Certificate Authority or get a free certificate pair from Let\u2019s Encrypt CA.<\/p>\n<p>For other custom configurations regarding DokuWiki, visit the documentation page at the following address: <a href=\"https:\/\/www.dokuwiki.org\/dokuwiki\" target=\"_blank\" rel=\"noopener\">https:\/\/www.dokuwiki.org\/dokuwiki<\/a><\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial I will show you how to install and configure the latest version DokuWiki CMS platform on Debian 9.2 release, in order to create online documentation websites. DokuWiki is a free open source wiki application written completely in the PHP programming language and often deployed in Linux under Apache\/Nginx web servers and PHP. DokuWiki &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-3175","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=3175"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3175\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=3175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=3175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=3175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}