Server - Contents

Pmwiki-Deployment

new: 09-Sep-2023

Establishing Pmwiki on the Internet

Assumptions: Server operating on Ubuntu22.04 with a functioning Webmin Cpanek and Nginx webserver. Although one can connect to the server via its IP, it is recommended to have a domain (or a sub-domain, such as wiki.myexample.com) with a certified SSL link (Let'sEncrypt).

Part A: Creating the Environment on the Server

Step1: Install PHP

sammy@imega:$ sudo apt-get install -y php8.1-cli php8.1-fpm
sudo systemctl is-active php8.1-fpm Check if active
sammy@imega:$ sudo nano /etc/php/8.1/fpm/pool.d/www.conf
- ensure that owner, group = www-data, that listen=127.0.0.1:9999 (Note: not sock type)
To enable php-fpm in Apache2 Webserver - do these two commands:
sammy@imega:$ sudo a2enmod proxy-fcgi setenvif
sammy@imega:$ sudo a2enconf php8.1-fpm

Reference: Howto-pmwiki-installation on Nginx

Step 2: Install Pmwiki
Type in the following:

sammy@imega:$ wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz
sammy@imega:$ tar -xzf pmwiki-latest.tgz
sammy@imega:$ rm pmwiki-latest.tgz
sammy@imega:$ mv pmwiki-2.3.25/ pmwiki/
sammy@imega:$ cd pmwiki/
sammy@imega /pmwiki:$ cp docs/sample-config.php /home/sammy/pmwiki/local/config.php
sammy@imega /pmwiki:$ cd ~
sammy@imega /pmwiki:$ chmod -R 775 pmwiki // set the permissions
sammy@imega:$ sudo ln -s pmwiki/ /var/www/wiki
sammy@imega:$ nano pmwiki/local/config.php

In the config.php, make these changes/additions:

$ScriptUrl = 'https://wiki.myexample.com/pmwiki.php';
$PubDirUrl = 'https://wiki.myexample.com/pub';
$FullName = 'https://wiki.myexample.com/pmwiki.php';
- change this reference to:
- [modify]: include_once("scripts/authuser.php");

Reference: Pmwiki-installation

Step 3: Nginx to render Pmwiki

3a. Open Webmin: Servers->Nginx Webserver and create a new virtual host
3b. Copy & paste this text in the Nginx virtual host (modify the domain): pmwiki-nginx.txt

Reference: Pmwiki-Nginx

Important Step 4: Secure your Pmwiki on the Internet see Pmwiki-Extras

Pmwiki Pmwiki-PartB
Pmwiki-Deploy Pmwiki-Extras