NGINX (pronounced "engine x" or "en-jin-eks") is the world's most popular Web Server, high performance Load Balancer, Reverse Proxy, API Gateway and Content Cache. NGINX is free and open source…




NGINX (pronounced "engine x" or "en-jin-eks") is the world's most popular Web Server, high performance Load Balancer, Reverse Proxy, API Gateway and Content Cache.
NGINX is free and open source software, distributed under the terms of a simplified [2-clause BSD-like license](LICENSE).
Enterprise distributions, commercial support and training are available from F5, Inc.
> [!IMPORTANT]
> The goal of this README is to provide a basic, structured introduction to NGINX for novice users. Please refer to the full NGINX documentation for detailed information on installing, building, configuring, debugging, and more. These documentation pages also contain a more detailed Beginners Guide, How-Tos, Development guide, and a complete module and directive reference.
Table of contents
- [How it works](#how-it-works)
- [Downloading and installing](#downloading-and-installing)
- [Getting started with NGINX](#getting-started-with-nginx)
- [Building from source](#building-from-source)
- [Asking questions and reporting issues](#asking-questions-and-reporting-issues)
- [Contributing code](#contributing-code)
- [Additional help and resources](#additional-help-and-resources)
- [Changelog](#changelog)
- [License](#license)
How it works
NGINX is installed software with binary packages available for all major operating systems and Linux distributions. See Tested OS and Platforms for a full list of compatible systems.> [!IMPORTANT]
> While nearly all popular Linux-based operating systems are distributed with a community version of nginx, we highly advise installation and usage of official packages or sources from this repository. Doing so ensures that you're using the most recent release or source code, including the latest feature-set, fixes and security patches.
Modules
NGINX is comprised of individual modules, each extending core functionality by providing additional, configurable features. See "Modules reference" at the bottom of nginx documentation for a complete list of official modules.NGINX modules can be built and distributed as static or dynamic modules. Static modules are defined at build-time, compiled, and distributed in the resulting binaries. See [Dynamic Modules](#dynamic-modules) for more information on how they work, as well as, how to obtain, install, and configure them.
> [!TIP] > You can issue the following command to see which static modules your NGINX binaries were built with:bash
nginx -V
> See [Configuring the build](#configuring-the-build) for information on how to include specific Static modules into your nginx build.
Configurations
NGINX is highly flexible and configurable. Provisioning the software is achieved via text-based config file(s) accepting parameters called "Directives". See Configuration File's Structure for a comprehensive description of how NGINX configuration files work.> [!NOTE]
> The set of directives available to your distribution of NGINX is dependent on which [modules](#modules) have been made available to it.
Runtime
Rather than running in a single, monolithic process, NGINX is architected to scale beyond Operating System process limitations by operating as a collection of processes. They include:- A "master" process that maintains worker processes, as well as, reads and evaluates configuration files.
- One or more "worker" processes that process data (eg. HTTP requests).
> [!TIP]
> Processes synchronize data through shared memory. For this reason, many NGINX directives require the allocation of shared memory zones. As an example, when configuring rate limiting, connecting clients may need to be tracked in a common memory zone so all worker processes can know how many times a particular client has accessed the server in a span of time.
Downloading and installing
Follow these steps to download and install precompiled NGINX binaries. You may also choose to [build NGINX locally from source code](#building-from-source).Stable and Mainline binaries
NGINX binaries are built and distributed in two versions: stable and mainline. Stable binaries are built from stable branches and only contain critical fixes backported from the mainline version. Mainline binaries are built from the master branch and contain the latest features and bugfixes. You'll need to decide which is appropriate for your purposes.Linux binary installation process
The NGINX binary installation process takes advantage of package managers native to specific Linux distributions. For this reason, first-time installations involve adding the official NGINX package repository to your system's package manager. Follow these steps to download, verify, and install NGINX binaries using the package manager appropriate for your Linux distribution.Upgrades
Future upgrades to the latest version can be managed using the same package manager without the need to manually download and verify binaries.FreeBSD installation process
For more information on installing NGINX on FreeBSD system, visit https://nginx.org/en/docs/install.htmlWindows executables
Windows executables for mainline and stable releases can be found on the main NGINX download page. Note that the current implementation of NGINX for Windows is at the Proof-of-Concept stage and should only be used for development and testing purposes. For additional information, please see nginx for Windows.Dynamic modules
NGINX version 1.9.11 added support for Dynamic Modules. Unlike Static modules, dynamically built modules can be downloaded, installed, and configured after the core NGINX binaries have been built. Official dynamic module binaries are available from the same package repository as the core NGINX binaries described in previous steps.> [!TIP]
> NGINX JavaScript (njs), is a popular NGINX dynamic module that enables the extension of core NGINX functionality using familiar JavaScript syntax.
> [!IMPORTANT]
> If desired, dynamic modules can also be built statically into NGINX at compile time.
Getting started with NGINX
For a gentle introduction to NGINX basics, please see our Beginner’s Guide.Installing SSL certificates and enabling TLS encryption
See Configuring HTTPS servers for a quick guide on how to enable secure traffic to your NGINX installation.Load Balancing
For a quick start guide on configuring NGINX as a Load Balancer, please see Using nginx as HTTP load balancer.Rate limiting
See our Rate Limiting with NGINX blog post for an overview of core concepts for provisioning NGINX as an API Gateway.Content caching
See A Guide to Caching with NGINX and NGINX Plus blog post for an overview of how to use NGINX as a content cache (e.g. edge server of a content delivery network).Building from source
The following steps can be used to build NGINX from source code available in this repository.Installing dependencies
Most Linux distributions will require several dependencies to be installed in order to build NGINX. The following instructions are specific to theapt package manager, widely available on most Ubuntu/Debian distributions and their derivatives.
> [!TIP]
> It is always a good idea to update your package repository lists prior to installing new packages.
> bash
> sudo apt update
>
Installing compiler and make utility
Use the following command to install the GNU C compiler and Make utility.bash
sudo apt install gcc make
Installing dependency libraries
bash
sudo apt install libpcre3-dev zlib1g-dev
> [!WARNING]
> This is the minimal set of dependency libraries needed to build NGINX with rewriting and gzip capabilities. Other dependencies may be required if you choose to build NGINX with additional modules. Monitor the output of the configure command discussed in the following sections for information on which modules may be missing. For example, if you plan to use SSL certificates to encrypt traffic with TLS, you'll need to install the OpenSSL library. To do so, issue the following command.
bash
>sudo apt install libssl-dev
## Cloning the NGINX GitHub repository
Using your preferred method, clone the NGINX repository into your development directory. See [Cloning a GitHub Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) for additional help.bash
git clone https://github.com/nginx/nginx.git
## Configuring the build
Prior to building NGINX, you must run the `configure` script with [appropriate flags](https://nginx.org/en/docs/configure.html). This will generate a Makefile in your NGINX source root directory that can then be used to compile NGINX with [options specified during configuration](https://nginx.org/en/docs/configure.html).
From the NGINX source code repository's root directory:bash
auto/configure
> [!IMPORTANT]
> Configuring the build without any flags will compile NGINX with the default set of options. Please refer to https://nginx.org/en/docs/configure.html for a full list of available build configuration options.
## Compiling
The `configure` script will generate a `Makefile` in the NGINX source root directory upon successful execution. To compile NGINX into a binary, issue the following command from that same directory:bash
make
## Location of binary and installation
After successful compilation, a binary will be generated at `/objs/nginx`. To install this binary, issue the following command from the source root directory:bash
sudo make install
> [!IMPORTANT]
> The binary will be installed into the `/usr/local/nginx/` directory.
## Running and testing the installed binary
To run the installed binary, issue the following command:bash
sudo /usr/local/nginx/sbin/nginx
You may test NGINX operation using `curl`.bash
curl localhost
The output of which should start with:html
<!DOCTYPE html>
Welcome to nginx!
```
Asking questions and reporting issues
See our [Support](SUPPORT.md) guidelines for information on how discuss the codebase, ask troubleshooting questions, and report issues.Contributing code
Please see the [Contributing](CONTRIBUTING.md) guide for information on how to contribute code.Additional help and resources
- See the NGINX Community Blog for more tips, tricks and HOW-TOs related to NGINX and related projects.
- Access nginx.org, your go-to source for all documentation, information and software related to the NGINX suite of projects.
Changelog
See our changelog to keep track of updates.License
[2-clause BSD-like license](LICENSE)---
Additional documentation available at: https://nginx.org/en/docs
-
nginx
The official NGINX Open Source repository.
C ★ 31k 12h agoExplain → -
unit ▣
NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
C ★ 5.6k 8mo agoExplain → -
kubernetes-ingress
NGINX and NGINX Plus Ingress Controllers for Kubernetes
Go ★ 5.0k 1h agoExplain → -
docker-nginx
Official NGINX Dockerfiles
Shell ★ 3.5k 7d agoExplain → -
nginx-prometheus-exporter
NGINX Prometheus Exporter for NGINX and NGINX Plus
Go ★ 2.0k 7d agoExplain → -
njs
A subset of JavaScript language to use in nginx
C ★ 1.6k 4h agoExplain → -
nginx-gateway-fabric
NGINX Gateway Fabric provides an implementation for the Gateway API using NGINX as the data plane.
Go ★ 1.1k 4h agoExplain → -
ngx-rust
Rust binding for NGINX
Rust ★ 901 12h agoExplain → -
nginx-s3-gateway
NGINX S3 Gateway
JavaScript ★ 727 9d agoExplain → -
ansible-role-nginx
Ansible role for installing NGINX
Jinja ★ 696 5h agoExplain → -
njs-examples
NGINX JavaScript examples
JavaScript ★ 689 1mo agoExplain → -
docker-nginx-unprivileged
Unprivileged NGINX Dockerfiles
Dockerfile ★ 469 7d agoExplain → -
nginx-acme
An NGINX module with the implementation of the automatic certificate management (ACMEv2) protocol
Rust ★ 438 10d agoExplain → -
agent
NGINX Agent provides an administrative entry point to remotely manage, configure and collect metrics and events from NGINX instances
Go ★ 360 4h agoExplain → -
nginx-otel
No description.
C++ ★ 264 3d agoExplain → -
ansible-role-nginx-config
Ansible role for configuring NGINX
Jinja ★ 173 8h agoExplain → -
nginx-tests
Test suite for nginx.
Perl ★ 132 15d agoExplain → -
njs-acme
Nginx NJS module runtime to work with ACME providers like Let's Encrypt for automated no-reload TLS certificate issue/renewal.
TypeScript ★ 92 15d agoExplain → -
documentation
Public source for docs.nginx.com
HTML ★ 88 3h agoExplain → -
nginx.org
Sources for the NGINX website and documentation
XSLT ★ 84 6h agoExplain → -
nginx-asg-sync
NGINX Plus Integration with Cloud Autoscaling
Go ★ 58 5d agoExplain → -
unit-docs ▣
NGINX Unit's official website and documentation
Python ★ 57 8mo agoExplain → -
nginx-ingress-helm-operator
NGINX Ingress Operator for NGINX and NGINX Plus Ingress Controllers. Based on the Helm chart for NGINX Ingress Controller - https://github.com/nginxinc/helm-charts
Mustache ★ 48 16h agoExplain → -
nginx-plus-go-client
A client for NGINX Plus API for Go
Go ★ 48 2d agoExplain → -
unit-wasm ▣
Development libraries for writing WebAssembly modules for NGINX Unit
C ★ 41 8mo agoExplain → -
pkg-oss
nginx packaging
Makefile ★ 37 1d agoExplain → -
nginx-quic-qns
No description.
Dockerfile ★ 27 9mo agoExplain → -
docker-extension
The NGINX Docker Desktop Extension can be used to manage the instance configuration of a running NGINX container.
TypeScript ★ 27 1y agoExplain → -
nginx-demos
NGINX Demos
C ★ 21 3d agoExplain → -
nginx-mcp-js
No description.
JavaScript ★ 19 3d agoExplain → -
homebrew-unit ▣
Unit Homebrew tap
Ruby ★ 17 8mo agoExplain → -
kubernetes.nginx.org
NGINX Kubernetes community landing page
HTML ★ 10 3d agoExplain → -
nginx-dev-examples
nginx module examples
C ★ 10 1y agoExplain → -
nginx-directive-reference
Machine-readable variants of NGINX directive documentation for use in other tools.
Go ★ 10 14h agoExplain → -
template-repository
A template repository for new NGINX projects
★ 9 3d agoExplain → -
alpine-fips
Alpine Linux with FIPS OpenSSL module
Dockerfile ★ 9 2d agoExplain → -
unit-cli ▣
An official read-only mirror of http://hg.nginx.org/unit-cli/
★ 8 8mo agoExplain → -
nginx-supportpkg-for-k8s
NGINX Support Package Tool For Kubernetes
Go ★ 5 1mo agoExplain → -
aws-marketplace-publish
Publish Docker images to AWS Marketplace
TypeScript ★ 5 1d agoExplain → -
winget-pkgs ⑂
The Microsoft community Windows Package Manager manifest repository
PowerShell ★ 4 2mo agoExplain → -
ci-self-hosted
No description.
★ 4 2mo agoExplain → -
nginx-loadbalancer-kubernetes ⑂
A Kubernetes Controller to synchronize NGINX+ Resources with Kubernetes Ingress Resources
Go ★ 4 3mo agoExplain → -
telemetry-exporter
This project is a library that exports product telemetry data to an F5-managed service. It is used by NGINX Ingress Controller and NGINX Gateway Fabric projects.
Go ★ 2 7h agoExplain → -
kic-test-containers
Docker containers used by the KIC team
Go ★ 2 2mo agoExplain → -
clang-ast
clang abstract syntax tree as used in nginx/njs/unit CI systems
C++ ★ 2 2mo agoExplain → -
scoop-bucket
This repository contains Scoop App manifests for NGINX projects
★ 2 8mo agoExplain → -
homebrew-tap
This repository contains Homebrew Formulae for NGINX projects
Ruby ★ 2 5mo agoExplain → -
ngx_http_delay_body_filter_module
a git clone of http://mdounin.ru/hg/ngx_http_delay_body_filter_module/ to be used in NGINX CI
C ★ 2 1y agoExplain → -
k8s-common
No description.
HCL ★ 1 6d agoExplain → -
agent-changelog
Python script to generate NGINX Agent changelog markdown document based on the GitHub changelog.
Python ★ 1 1y agoExplain → -
waf-policy-controller
No description.
★ 0 17d agoExplain → -
compliance-rules
Rules for SCA and SAST scans
★ 0 1mo agoExplain → -
nur
NGINX NUR repository based on the NUR template and NIX package manager
Nix ★ 0 20d agoExplain → -
community-blog
No description.
★ 0 17d agoExplain → -
nap-crds
No description.
★ 0 8mo agoExplain → -
nap-selinux
SElinux integration for NAP4/5
Shell ★ 0 11mo agoExplain → -
nap-apparmor
Apparmor integration for NAP4/5
Shell ★ 0 11mo agoExplain → -
.github
Default community health files
★ 0 1y agoExplain → -
docker-image-update-checker ⑂
Docker Image Update Checker Action
★ 0 1y agoExplain → -
draft-release ⑂
Draft the next GitHub release
★ 0 1y agoExplain → -
xslscript
No description.
Perl ★ 0 1y agoExplain →
No repos match these filters.