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
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