4.22.26: The final Web Server has been migrated to Hyper-V.  I am down to six VMs.  

Old Server


Filesystem Size Used Avail Use% Mounted on
tmpfs 795M 4.3M 790M 1% /run
/dev/sdc1 49G 4.1G 43G 9% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sdb1 221G 12G 199G 6% /var
/dev/sda2 1.5G 200M 1.2G 15% /boot
tmpfs 795M 12K 795M 1% /run/user/1000
michael@webserver24:~$

Disk configuration

New-VHD -Path 'E:\Hyper-V\WebServer1030\WebServer1030_boot.vhdx' -SizeBytes 1500MB -Dynamic -BlockSizeBytes 1MB
New-VHD -Path 'E:\Hyper-V\WebServer1030\WebServer1030_root.vhdx' -SizeBytes 50GB -Dynamic -BlockSizeBytes 1MB
New-VHD -Path 'E:\Hyper-V\WebServer1030\WebServer1030_var.vhdx' -SizeBytes 225GB -Dynamic -BlockSizeBytes 1MB
New-VHD -Path 'E:\Hyper-V\WebServer1030\WebServer1030_swap.vhdx' -SizeBytes 8GB -Dynamic -BlockSizeBytes 1MB

/boot:  1.5GB:  I could make it 1.5GB.  I have had it contain many kernels.

/ or root parititon:  50GB:    The Apache2 Web Server using MariaDB as its database.  I put it in its own vDisk to protect it as files grow on the web site.   /etc holds alot of files for websites.  

/var:  225GB:   The Apache2 Web Server is in /var/www directory for the virtual web sites.  I have had as many as 5 virtual web sites in Apache 2.  

/swap: 8GB: swap partition

IPv6 bug on ondrej repositories.  Disable IPv6 till installed.

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/apache2
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0

AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message

sudo nano /etc/apache2/apache2.conf
Go to the bottom of the file and add the following line:
ServerName 127.0.0.1
ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 0.0.0.0:80
Listen 0.0.0.0:9443

<IfModule ssl_module>
Listen 0.0.0.0:443
</IfModule>

<IfModule mod_gnutls.c>
Listen 0.0.0.0:443
</IfModule>
:
sudo a2enmod rewrite
sudo a2enmod cache
sudo a2enmod cache_disk
sudo a2enmod expires
sudo systemctl restart apache2
sudo systemctl status apache2


* apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
Active: active (running) since Mon 2026-04-20 17:19:04 UTC; 7s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 30499 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 30504 (apache2)
Tasks: 6 (limit: 9434)
Memory: 18.2M (peak: 18.4M)
CPU: 113ms
CGroup: /system.slice/apache2.service
|-30504 /usr/sbin/apache2 -k start
|-30506 /usr/sbin/apache2 -k start
|-30507 /usr/sbin/apache2 -k start
|-30508 /usr/sbin/apache2 -k start
|-30509 /usr/sbin/apache2 -k start
`-30510 /usr/sbin/apache2 -k start

Apr 20 17:19:04 webserver1030 systemd[1]: Starting apache2.service - The Apache HTTP Server...
Apr 20 17:19:04 webserver1030 systemd[1]: Started apache2.service - The Apache HTTP Server.
michael@webserver1030:/etc/apache2$
apache2 -v
Server version: Apache/2.4.66 (Ubuntu)
Server built: 2025-12-05T15:02:28

Install PHP: 

This is setup for my WordPress virtual servers.  I am on 8.4.20 for now.  MyPHPAdmin isn’t working with PHP 8.5.  I am waiting for more support

mcrypt is deprecated in PHP 8.3. 

sudo apt install php8.4 libapache2-mod-php8.4 php8.4-common php8.4-mysql php8.4-gmp php8.4-curl php8.4-intl php8.4-mbstring php8.4-xmlrpc php8.4-gd php8.4-xml php8.4-cli php8.4-zip php8.4-bcmath php8.4-imagick php8.4-fpm php8.4-bz2 php8.4-soap
php -v
PHP 8.4.20 (cli) (built: Apr 11 2026 07:43:26) (NTS)
Copyright (c) The PHP Group
Built by Debian
Zend Engine v4.4.20, Copyright (c) Zend Technologies
with Zend OPcache v8.4.20, Copyright (c), by Zend Technologies

php-fpm installation

sudo a2enconf php8.4-fpm 
sudo apt purge libapache2-mod-php8.3 libapache2-mod-php
sudo apt install libapache2-mod-php8.4 libapache2-mod-php
sudo apt-get install php8.4-fpm
sudo a2dismod php8.3
sudo a2enconf php8.4-fpm
sudo a2enmod proxy_fcgi
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo a2enmod http2
sudo systemctl restart apache2
Loaded Configuration File
/etc/php/8.4/fpm/php.ini
upload_max_filesize = 768M
post_max_size =768M
memory_limit = 768M
max_execution_time = 360
max_input_vars = 4000

Create the log directories in /var/log/apache2 for each of your virtual web sites.   root:root permissions.

 

/var/log/php8.4

sudo mkdir /var/log/php8.4
sudo mkdir /var/log/phpmyadmin
sudo chown syslog:adm /var/log/php8.4
sudo chown syslog:adm /var/log/phpmyadmin
/etc/php/8.4/fpm$

php-fpm.conf
error_log = /var/log/php8.4/php8.4-fpm.log

/etc/logrotate.d/php8.4-fpm

/var/log/php8.4/php8.4-fpm.log {
rotate 12
weekly
missingok
notifempty
compress
delaycompress
postrotate
if [ -x /usr/lib/php/php8.4-fpm-reopenlogs ]; then
/usr/lib/php/php8.4-fpm-reopenlogs;
fi
endscript
}

phpMyAdmin 5.2.3:  won’t work until I fix Let’s Encrypt on this server

sudo wget https://files.phpmyadmin.net/phpMyAdmin/5.2.3/phpMyAdmin-5.2.3-english.tar.gz 
sudo tar xvzf phpMyAdmin-5.2.3-english.tar.gz
sudo cp -avr ./phpMyAdmin-5.2.3-english/. /usr/share/phpmyadmin

I have to get www.scsiraidguru.com working before I can get phpmyadmin on SSL.  

Samba

sudo apt install samba smbclient
sudo smbpasswd -a xxxx
[home]
browseable = yes
writable = yes
path = /home/xxxx
valid users = xxxx
guest ok = no
read only = no

[www]
browseable = yes
writable = yes
path = /var/www
valid users = xxxx
guest ok = no
read only = no
sudo systemctl enable smb.service
sudo systemctl enable nmb.service
sudo systemctl start smb.service
sudo systemctl start nmb.service

MariaDB 11.8 LTS

Install and upgrade MariaDB to 11.8.x

sudo apt update

sudo apt upgrade

sudo apt install mariadb-server mariadb-client -y

mariadb –version

sudo systemctl status mariadb

sudo systemctl start mariadb

sudo systemctl status mariadb

By default in 24.04, you are now at MariaDB 10.11.14

Now we will upgrade MariaDB to 11.8

# download latest repo setup for 11.8
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=11.8
# upgrade the components
sudo apt upgrade mariadb-server mariadb-client mariadb-backup
sudo systemctl status mariadb
● mariadb.service - MariaDB 11.8.6 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: active (running) since Tue 2026-04-21 13:16:41 UTC; 59min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 7425 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && echo _WSREP_START_POSITION=$VAR > /run/mysqld/wsrep-start-position || exit 1 (code=exited, status>
Process: 7495 ExecStartPost=/bin/rm -f /run/mysqld/wsrep-start-position /run/mysqld/wsrep-new-cluster (code=exited, status=0/SUCCESS)
Process: 7497 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
Main PID: 7481 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 10 (limit: 62267)
Memory: 112.5M (peak: 117.5M)
CPU: 6.672s
CGroup: /system.slice/mariadb.service
└─7481 /usr/sbin/mariadbd

Apr 21 13:16:39 webserver1030 mariadbd[7481]: 2026-04-21 13:16:39 0 [Note] InnoDB: Buffer pool(s) load completed at 260421 13:16:39
Apr 21 13:16:41 webserver1030 mariadbd[7481]: 2026-04-21 13:16:41 0 [Note] Server socket created on IP: '127.0.0.1', port: '3306'.
Apr 21 13:16:41 webserver1030 mariadbd[7481]: 2026-04-21 13:16:41 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
Apr 21 13:16:41 webserver1030 mariadbd[7481]: 2026-04-21 13:16:41 0 [Note] /usr/sbin/mariadbd: ready for connections.
Apr 21 13:16:41 webserver1030 mariadbd[7481]: Version: '11.8.6-MariaDB-ubu2404' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
Apr 21 13:16:41 webserver1030 systemd[1]: Started mariadb.service - MariaDB 11.8.6 database server.
Apr 21 13:16:41 webserver1030 /etc/mysql/debian-start[7499]: Upgrading MariaDB tables if necessary.
Apr 21 13:16:48 webserver1030 /etc/mysql/debian-start[7589]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables
Apr 21 13:21:39 webserver1030 mariadbd[7481]: 2026-04-21 13:21:39 0 [Note] feedback plugin: report to 'https://feedback.mariadb.org/rest/v1/post' was sent
Apr 21 13:21:39 webserver1030 mariadbd[7481]: 2026-04-21 13:21:39 0 [Note] feedback plugin: server replied 'ok'
CREATE USER 'sa'@'localhost' IDENTIFIED BY 'xxxxxxxxxxxx';
ALTER USER 'sa'@'localhost' IDENTIFIED BY 'xxxxxxxxxxxx';
GRANT ALL PRIVILEGES ON *.* TO 'sa'@'localhost' IDENTIFIED BY 'xxxxxxxxxxxx';
GRANT ALL PRIVILEGES ON *.* TO 'sa'@'localhost' WITH GRANT OPTION;

I am old school, I created an sa account for my system admin account.  

I ran:
sudo apt autoclean
sudo apt autoremove

received a Mariadb error provider for replication.

sudo apt install mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4 mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo mariadb-plugin-provider-snappy

DHparams.pem creation

sudo mkdir /etc/apache2/ssl for dhparams.pem file.  When I had Godaddy for certificates.  They went into /etc/apache2/ssl.  You can put the dhparams.pem file any place you want  

sudo openssl dhparam -out /etc/apache2/ssl/dhparams.pem 4096