How to Tune Nginx for a High-Traffic Website
Tune Nginx in the order that matters: measure first, raise the connection and file limits, reuse backend connections, cache repeat responses and limit abuse without blocking real visitors.
Linux server administration for hosting: memory, CPU and disk diagnostics, Nginx, PHP-FPM, databases and capacity planning.
22 articles
Tune Nginx in the order that matters: measure first, raise the connection and file limits, reuse backend connections, cache repeat responses and limit abuse without blocking real visitors.
Tune MariaDB on a dedicated server: measure first, size the InnoDB buffer pool, match I/O to NVMe, cap connections, keep durability safe and fix the slow queries with indexes.
A 502 from Nginx means the program behind it did not answer. The last line of the error log says how it failed, and each message has one fix.
Read SMART data with smartctl on SATA and NVMe drives: which counters warn of failure, how to run self-tests, and how to get alerts from smartd.
Host several websites on one VPS safely: a separate user, PHP-FPM pool, Nginx server block, database and SSL certificate for each site.
Add a swap file on an Ubuntu VPS in five commands: choose the size, make it permanent in fstab, set swappiness to 10 and check it is not overused.
Get back into a dedicated server after a firewall, SSH or network mistake using the IPMI console: five causes, the fix for each, and a password reset.
Install vnStat, read monthly and daily totals, get a warning at 80% of your traffic allowance, and find which files and visitors use the most.
A nightly script that dumps every MariaDB, MySQL and PostgreSQL database to its own file, keeps 14 days and checks each one, plus how to restore.