Need to migrate your e-mails to a new server? Free and paid versions of our online tool available.
Hero Image

Server Setup Guides

Nginx Rate Limiting on RHEL 9

Nginx Rate Limiting on RHEL 9

Define zones in http block

http {
    limit_req_zone $binary_remote_addr zone=api:10m     rate=10r/s;
    limit_req_zone $binary_remote_addr zone=login:10m   rate=5r/m;
}

Apply to locations

location /api/ {
    limit_req zone=api burst=20 nodelay;
    limit_re...
7th May 2026

PHP-FPM Multiple Pools on RHEL 9

PHP-FPM Multiple Pools on RHEL 9

Pool directory: /etc/php-fpm.d/

Create /etc/php-fpm.d/site1.conf

[site1]
user  = site1
group = site1
listen = /run/php-fpm/site1.sock
listen.owner = www-data
listen.group = www-data
listen.mode  = 0660
pm = dynamic
pm.max_children      = 10
pm.start_servers...
7th May 2026

Redis Cluster on RHEL 9

Redis Cluster on RHEL 9

Minimum 3 primaries + 3 replicas (6 nodes). This example uses ports 7000-7005 on localhost.

Step 1 – Create node configs

for port in 7000 7001 7002 7003 7004 7005; do
    mkdir -p /etc/redis/cluster/$port /var/lib/redis/$port
    cat > /etc/redis/cluster/$port/redis.con...
7th May 2026

Redis Persistence on RHEL 9

Redis Persistence on RHEL 9

RDB snapshots (redis.conf)

save 900 1
save 300 10
save 60 10000
dbfilename  dump.rdb
dir         /var/lib/redis
rdbcompression yes
rdbchecksum    yes

AOF (Append-Only File)

appendonly           yes
appendfilename       "appendonly.aof"
appendfsync          every...
7th May 2026

Redis Sentinel (HA) on RHEL 9

Redis Sentinel (HA) on RHEL 9

Architecture

  • Primary 192.168.1.10:6379
  • Replica 192.168.1.11:6379, 192.168.1.12:6379
  • Sentinels on port 26379 (all 3 nodes)

Primary redis.conf

bind 0.0.0.0
requirepass RedisPass!

Replica redis.conf

bind 0.0.0.0
requirepass RedisPass!
replicaof 192.16...
7th May 2026

Secure MySQL on RHEL 9

Secure MySQL on RHEL 9

Step 1 – Run mysql_secure_installation

mysql_secure_installation

Set root password, remove anonymous users, disallow remote root login, remove test DB.

Step 2 – Bind to localhost

[mysqld]
bind-address = 127.0.0.1

Step 3 – Audit users

SELECT User, Host, plugin FRO...
7th May 2026

SSH TOTP MFA on RHEL 9

SSH TOTP MFA on RHEL 9

Step 1 – Install PAM module

dnf install -y google-authenticator-libpam

Step 2 – Configure for each user

google-authenticator
# time-based: y, update file: y, disallow reuse: y, rate limit: y

Scan QR code with an authenticator app (Aegis, Google Authenticator, etc.).

...
7th May 2026

Tune PHP OPcache on RHEL 9

Tune PHP OPcache on RHEL 9

Edit /etc/php.d/10-opcache.ini

opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=20000
opcache.revalidate_freq=60
opcache.validate_timestamps=1
; JIT (PHP 8.x)
opcache.jit=tracing
opca...
7th May 2026

Tune PHP-FPM Performance on RHEL 9

Tune PHP-FPM Performance on RHEL 9

Estimate pm.max_children

ps -ylC php-fpm --no-headers | awk '{sum+=$8} END {print sum/NR/1024 " MB avg"}'
# Divide available RAM (minus OS+DB) by average size
pm = dynamic
pm.max_children      = 50
pm.start_servers     = 10
pm....
7th May 2026

Tune Varnish Cache on RHEL 9

Tune Varnish Cache on RHEL 9

Systemd override (/etc/systemd/system/varnish.service.d/override.conf)

[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd \
    -a :80 -T localhost:6082 \
    -f /etc/varnish/default.vcl \
    -s malloc,2G \
    -p thread_pools=2 \
    -p thread_pool_min=200 \
    -...
7th May 2026