Introduction to Nginx
Harry
· 12 Sep 2026
· 55 views
What is Nginx?
Nginx (pronounced engine-x) is a high-performance web server, reverse proxy and load balancer. It handles thousands of concurrent connections on modest hardware because of its event-driven, asynchronous architecture - one worker process serves many requests without a thread per connection.
Why Nginx?
- Speed - static files and proxy traffic are handled extremely efficiently.
- Reverse proxy - sits in front of app servers (Tomcat, Node, PHP-FPM) and forwards requests.
- Load balancing - spreads traffic across several backends.
- TLS termination - handles HTTPS certificates and offloads encryption.
- Caching and gzip - serves cached responses and compressed content.
Nginx vs Apache
Apache uses a process/thread per request (simpler, feature-rich via .htaccess); Nginx is event-driven (better under concurrent load, config is centralized). Many production stacks use Nginx in front and leave historical Apache behind.
Core Vocabulary
- Directive - a config instruction:
listen 80;,root /var/www;. - Context - where directives live:
http,server,location,upstream. - Server block - one virtual host (site).
- Worker - a process serving requests (one per CPU core by default).
Key Points
- Nginx excels at concurrency, proxying, TLS and caching.
- Configuration is centralized and directive-based, not per-folder (.htaccess).
- Understand contexts - directives mean different things in different blocks.