nginx/nginx
NGINX
NGINX is a high-performance HTTP server, reverse proxy, load balancer, mail proxy, and generic TCP/UDP proxy. The codebase is a single C99 program built from auto/configure + make that produces one binary, objs/nginx, plus a small set of bundled config files. The same binary can serve static files, terminate TLS, proxy to upstream HTTP/FastCGI/uwsgi/SCGI/gRPC backends, do HTTP/2 and HTTP/3 (QUIC), proxy POP3/IMAP/SMTP, and load-balance arbitrary TCP/UDP streams.
The project was started in 2002 by Igor Sysoev as a faster alternative to Apache and the canonical "C10K" web server. It is now stewarded by F5 and developed in this repository as the "mainline" branch — the upstream feeds both the open-source nginx distribution and F5's commercial NGINX Plus.
What's in the repo
src/— every line of nginx code, organized by subsystem (core/,event/,http/,mail/,stream/,os/,misc/)auto/— the hand-written configure system. Shell scripts that probe the host, generateobjs/Makefileandobjs/ngx_auto_config.h, and stitch together the static module listconf/— samplenginx.confand MIME type tables shipped with the installcontrib/— small utilities (geo2nginx.pl, vim syntax files, Unicode-to-NGINX charset converter)docs/— the XML/XSLT toolchain that builds nginx.org/en/docs and the man pagemisc/— auxiliary build assets (docs/man, release tooling)
Where to start
| If you want to… | Read |
|---|---|
| Understand the runtime architecture | Architecture |
| Build nginx and run the test suite | Getting started |
| Look up a project-specific term | Glossary |
| Trace an HTTP request through the code | systems/http/request-lifecycle |
| Write a new module | systems/configuration and primitives/module |
| See what's actually inside the repo today | By the numbers |
| Trace 23 years of history | Lore |
Quick stats
- Languages: C (~99 %), with one C++ file (
src/misc/ngx_cpp_test_module.cpp— a build sanity check) and a Perl XS module (src/http/modules/perl/) - Source files: 260
.cfiles, 135.hfiles - LOC: ~247,000 lines of C across
src/,auto/,contrib/,docs/ - Modules: ~80 bundled modules across
http/,stream/,mail/,event/ - Supported OSes: Linux, FreeBSD, macOS, Solaris, AIX, Windows (proof-of-concept)
- License: 2-clause BSD
Project status
This repository is the canonical mainline source. Tagged stable branches live elsewhere; the master branch here always carries the latest features and bugfixes. See Lore for the full history of branches, rewrites, and deprecations.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.