nginx/nginx
Tooling
The set of build, lint, and helper tools that come with the repo.
auto/ — the configure system
auto/configure is hand-written Bourne shell. It probes the system, decides which features are available, and emits objs/Makefile plus objs/ngx_auto_config.h. The relevant scripts:
| Script | Purpose |
|---|---|
auto/configure |
Top-level; sources every other piece |
auto/options |
Defines all --with-* / --without-* flags |
auto/cc |
Picks compiler flags per OS + compiler combo (auto/cc/gcc, clang, icc, msvc, bcc, owc, sunc) |
auto/lib |
Probes for + configures bundled libraries (PCRE, OpenSSL, zlib, libxslt, libgd, libgeoip) |
auto/os |
Detects the OS and pulls in OS-specific tweaks (auto/os/linux, freebsd, darwin, solaris, win32, etc.) |
auto/modules |
Stitches together the static module list and emits objs/ngx_modules.c |
auto/make |
Generates the rules in objs/Makefile |
auto/sources |
Lists which .c files belong to which subsystem |
auto/feature |
Helper: tries to compile a small C snippet to test a feature |
auto/install |
Generates the install Makefile target |
auto/summary |
Prints the "Configuration summary" at the end of auto/configure |
The pattern is: auto/configure calls these in a deterministic order, each one appends to objs/Makefile, sets a few shell variables, or writes a line to ngx_auto_config.h. You can re-read the generated files to see exactly what your build will compile with.
To add a new optional dependency, you add probes under auto/lib/<name>/ (mirroring auto/lib/openssl/, auto/lib/pcre/, etc.). To add a new bundled module, you add an entry to auto/modules and a sources entry in auto/sources.
make
After auto/configure runs, make (or gmake on BSD) is plain GNU make plus the rules auto/make emitted. The default target builds objs/nginx. make install installs the binary, the conf files, and the man page. make modules rebuilds dynamic modules.
CI workflows
The GitHub Actions workflows are linters and metadata gates, not build farms. The actual cross-platform build/test happens on F5's external buildbot (triggered via buildbot.yml).
| Workflow | What it does |
|---|---|
check-pr.yml |
PR shape (target branch, etc.) |
check-commit-message.yaml |
Runs .github/scripts/commit-msg-check.pl on every commit |
check-whitespace.yaml |
git log --check: trailing whitespace, conflict markers |
check-version-bump.yaml |
Catches accidental nginx.h version bumps in PRs |
f5_cla.yml |
Enforces F5 CLA agreement on contributors |
mark-issues-prs-stale.yaml |
Stale-bot: comments on long-idle issues/PRs |
new-issue-welcome.yaml |
Posts a welcome on first-time issuer |
buildbot.yml |
Webhook to F5's external buildbot infrastructure |
The workflow scripts live in .github/scripts/ (currently commit-msg-check.pl).
contrib/
Small ancillary tools shipped with the source:
| Path | Purpose |
|---|---|
contrib/geo2nginx.pl |
Convert a CSV IP-to-country list into a geo directive |
contrib/unicode2nginx/ |
Convert Unicode tables into the charset_map format |
contrib/vim/ |
Vim syntax highlighting for nginx.conf |
docs/
The XML/XSLT toolchain that builds the public website at nginx.org/en/docs and the man page. Contributors who change a directive's behavior are expected to update the corresponding XML in docs/xml/. The toolchain isn't required for compiling nginx itself.
docs/
├── GNUmakefile
├── dtd/
├── html/ # generated HTML output (not committed)
├── man/ # nroff source for nginx.8
├── xml/ # XML source for the website
├── xsls/ # XSLT stylesheets
└── xslt/Editor support
There's no .editorconfig and the project does not use clang-format. The whitespace-check workflow is the de facto formatter — if git log --check is happy, the patch is clean.
For Vim: contrib/vim/ provides syntax highlighting + filetype detection for nginx.conf. There's nothing comparable for the C source.
Optional / external
- valgrind — works on debug builds; useful for connection-pool leak chasing.
- AddressSanitizer / UBSan — pass through
--with-cc-opt='-fsanitize=...'and--with-ld-opt='-fsanitize=...'. - clang static analyzer (
scan-build) — runs cleanly on the codebase. - Coverity Scan — F5 has historically run Coverity against mainline; results aren't public.
Versioning
The version constant NGINX_VERSION lives in src/core/nginx.h. A version bump is a one-line PR before each release tag. The check-version-bump.yaml workflow guards against accidental edits to that line in feature PRs.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.