jonas.splinter
Technology

nginx

A fast, lightweight web server and reverse proxy. It has served my projects since 2019, and I install it from nginx.org's own packages.

Igor Sysoev originally wrote nginx, pronounced 'engine x', to handle many simultaneous connections with little memory. Instead of giving every visitor its own process, a small number of worker processes handle connections through events. Besides serving files, it works as a reverse proxy, a load balancer and a content cache, all set up in plain text configuration files with a clear block structure.

I have used nginx as the web server for my projects since 2019. Most of what I build has a PHP or Laravel back end, and nginx fits that well: it answers requests for images, stylesheets and scripts itself and passes the rest on to the application. That keeps the application lean, which helps page speed.

nginx.org publishes two branches. Mainline gets new features first; stable changes little and mostly receives fixes for serious bugs. In November 2026 I started installing nginx straight from nginx.org's own package repository, on the stable branch, instead of the operating system's package. The reason is security: nginx.org ships its fixes first, while a packaged copy can lag behind.

One small habit pays off: test the configuration with nginx -t before a reload. It shows a mistake before anything changes, and the reload itself lets old worker processes finish the requests they are serving.

2 blog posts

Longer articles about nginx

2 updates

Everything I posted about nginx, newest first

Personal

New post: Let monit tell you when an update is waiting

New

An update can be available, installed, or actually running. How to make monit watch all three with small shell checks, and how to prove each check really fires.

Personal

New post: Why I now take nginx straight from nginx.org

New

Security fixes for nginx reach nginx.org first and an operating system's package later. Why I switched to the official package, the trade-off, the traps of switching and how to make sure an update is really running.