{"id":13440804,"url":"https://github.com/nginx/nginx","last_synced_at":"2026-02-04T20:01:57.804Z","repository":{"id":34088947,"uuid":"37912398","full_name":"nginx/nginx","owner":"nginx","description":"The official NGINX Open Source repository.","archived":false,"fork":false,"pushed_at":"2025-04-29T15:53:41.000Z","size":74814,"stargazers_count":26737,"open_issues_count":212,"forks_count":7268,"subscribers_count":966,"default_branch":"master","last_synced_at":"2025-05-01T13:52:04.720Z","etag":null,"topics":["content-cache","http","http2","http3","https","load-balancer","mail-proxy-server","nginx","quic","reverse-proxy","security","tcp-proxy-server","tls","udp-proxy-server","web-server"],"latest_commit_sha":null,"homepage":"https://nginx.org/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nginx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-06-23T10:26:27.000Z","updated_at":"2025-05-01T12:12:53.000Z","dependencies_parsed_at":"2023-02-18T06:16:04.872Z","dependency_job_id":"2d75ea16-e258-435d-9e43-e0d234a78759","html_url":"https://github.com/nginx/nginx","commit_stats":{"total_commits":8247,"total_committers":96,"mean_commits":85.90625,"dds":0.5534133624348248,"last_synced_commit":"1a64c196a7d43f83a14fec20ce8936e599c92865"},"previous_names":[],"tags_count":572,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nginx%2Fnginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nginx%2Fnginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nginx%2Fnginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nginx%2Fnginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nginx","download_url":"https://codeload.github.com/nginx/nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253671631,"owners_count":21945462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["content-cache","http","http2","http3","https","load-balancer","mail-proxy-server","nginx","quic","reverse-proxy","security","tcp-proxy-server","tls","udp-proxy-server","web-server"],"created_at":"2024-07-31T03:01:26.415Z","updated_at":"2026-02-04T20:01:57.797Z","avatar_url":"https://github.com/nginx.png","language":"C","readme":"\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/user-attachments/assets/9335b488-ffcc-4157-8364-2370a0b70ad0\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/user-attachments/assets/3a7eeb08-1133-47f5-859c-fad4f5a6a013\"\u003e\n  \u003cimg alt=\"NGINX Banner\"\u003e\n\u003c/picture\u003e\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![Community Forum](https://img.shields.io/badge/community-forum-009639?logo=discourse\u0026link=https%3A%2F%2Fcommunity.nginx.org)](https://community.nginx.org)\n[![License](https://img.shields.io/badge/License-BSD%202--Clause-blue.svg)](/LICENSE)\n[![Code of Conduct](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](/CODE_OF_CONDUCT.md)\n\nNGINX (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.\n\nNGINX is free and open source software, distributed under the terms of a simplified [2-clause BSD-like license](LICENSE).\n\nEnterprise distributions, commercial support and training are available from [F5, Inc](https://www.f5.com/products/nginx).\n\n\u003e [!IMPORTANT]\n\u003e The goal of this README is to provide a basic, structured introduction to NGINX for novice users. Please refer to the [full NGINX documentation](https://nginx.org/en/docs/) for detailed information on [installing](https://nginx.org/en/docs/install.html), [building](https://nginx.org/en/docs/configure.html), [configuring](https://nginx.org/en/docs/dirindex.html), [debugging](https://nginx.org/en/docs/debugging_log.html), and more. These documentation pages also contain a more detailed [Beginners Guide](https://nginx.org/en/docs/beginners_guide.html), How-Tos, [Development guide](https://nginx.org/en/docs/dev/development_guide.html), and a complete module and [directive reference](https://nginx.org/en/docs/dirindex.html).\n\n# Table of contents\n- [How it works](#how-it-works)\n  - [Modules](#modules)\n  - [Configurations](#configurations)\n  - [Runtime](#runtime)\n- [Downloading and installing](#downloading-and-installing)\n  - [Stable and Mainline binaries](#stable-and-mainline-binaries)\n  - [Linux binary installation process](#linux-binary-installation-process)\n  - [FreeBSD installation process](#freebsd-installation-process)\n  - [Windows executables](#windows-executables)\n  - [Dynamic modules](#dynamic-modules)\n- [Getting started with NGINX](#getting-started-with-nginx)\n  - [Installing SSL certificates and enabling TLS encryption](#installing-ssl-certificates-and-enabling-tls-encryption)\n  - [Load Balancing](#load-balancing)\n  - [Rate limiting](#rate-limiting)\n  - [Content caching](#content-caching)\n- [Building from source](#building-from-source)\n  - [Installing dependencies](#installing-dependencies)\n  - [Cloning the NGINX GitHub repository](#cloning-the-nginx-github-repository)\n  - [Configuring the build](#configuring-the-build)\n  - [Compiling](#compiling)\n  - [Location of binary and installation](#location-of-binary-and-installation)\n  - [Running and testing the installed binary](#running-and-testing-the-installed-binary)\n- [Asking questions and reporting issues](#asking-questions-and-reporting-issues)\n- [Contributing code](#contributing-code)\n- [Additional help and resources](#additional-help-and-resources)\n- [Changelog](#changelog)\n- [License](#license)\n\n# How it works\nNGINX is installed software with binary packages available for all major operating systems and Linux distributions. See [Tested OS and Platforms](https://nginx.org/en/#tested_os_and_platforms) for a full list of compatible systems.\n\n\u003e [!IMPORTANT]\n\u003e 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](https://nginx.org/en/linux_packages.html) 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.\n\n## Modules\nNGINX is comprised of individual modules, each extending core functionality by providing additional, configurable features. See \"Modules reference\" at the bottom of [nginx documentation](https://nginx.org/en/docs/) for a complete list of official modules.\n\nNGINX 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.\n\n\u003e [!TIP]\n\u003e You can issue the following command to see which static modules your NGINX binaries were built with:\n```bash\nnginx -V\n```\n\u003e See [Configuring the build](#configuring-the-build) for information on how to include specific Static modules into your nginx build.\n\n## Configurations\nNGINX is highly flexible and configurable. Provisioning the software is achieved via text-based config file(s) accepting parameters called \"[Directives](https://nginx.org/en/docs/dirindex.html)\". See [Configuration File's Structure](https://nginx.org/en/docs/beginners_guide.html#conf_structure) for a comprehensive description of how NGINX configuration files work.\n\n\u003e [!NOTE]\n\u003e The set of directives available to your distribution of NGINX is dependent on which [modules](#modules) have been made available to it.\n\n## Runtime\nRather 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:\n- A \"master\" process that maintains worker processes, as well as, reads and evaluates configuration files.\n- One or more \"worker\" processes that process data (eg. HTTP requests).\n\nThe number of [worker processes](https://nginx.org/en/docs/ngx_core_module.html#worker_processes) is defined in the configuration file and may be fixed for a given configuration or automatically adjusted to the number of available CPU cores. In most cases, the latter option optimally balances load across available system resources, as NGINX is designed to efficiently distribute work across all worker processes.\n\n\u003e [!TIP]\n\u003e 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](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req), connecting clients may need to be tracked in a [common memory zone](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_zone) so all worker processes can know how many times a particular client has accessed the server in a span of time.\n\n# Downloading and installing\nFollow these steps to download and install precompiled NGINX binaries. You may also choose to [build NGINX locally from source code](#building-from-source).\n\n## Stable and Mainline binaries\nNGINX 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](https://github.com/nginx/nginx/tree/master) and contain the latest features and bugfixes. You'll need to [decide which is appropriate for your purposes](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#choosing-between-a-stable-or-a-mainline-version).\n\n## Linux binary installation process\nThe 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](https://nginx.org/en/linux_packages.html) to download, verify, and install NGINX binaries using the package manager appropriate for your Linux distribution.\n\n### Upgrades\nFuture upgrades to the latest version can be managed using the same package manager without the need to manually download and verify binaries.\n\n## FreeBSD installation process\nFor more information on installing NGINX on FreeBSD system, visit https://nginx.org/en/docs/install.html\n\n## Windows executables\nWindows executables for mainline and stable releases can be found on the main [NGINX download page](https://nginx.org/en/download.html). 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](https://nginx.org/en/docs/windows.html).\n\n## Dynamic modules\nNGINX version 1.9.11 added support for [Dynamic Modules](https://nginx.org/en/docs/ngx_core_module.html#load_module). Unlike Static modules, dynamically built modules can be downloaded, installed, and configured after the core NGINX binaries have been built. [Official dynamic module binaries](https://nginx.org/en/linux_packages.html#dynmodules) are available from the same package repository as the core NGINX binaries described in previous steps.\n\n\u003e [!TIP]\n\u003e [NGINX JavaScript (njs)](https://github.com/nginx/njs), is a popular NGINX dynamic module that enables the extension of core NGINX functionality using familiar JavaScript syntax.\n\n\u003e [!IMPORTANT]\n\u003e If desired, dynamic modules can also be built statically into NGINX at compile time.\n\n# Getting started with NGINX\nFor a gentle introduction to NGINX basics, please see our [Beginner’s Guide](https://nginx.org/en/docs/beginners_guide.html).\n\n## Installing SSL certificates and enabling TLS encryption\nSee [Configuring HTTPS servers](https://nginx.org/en/docs/http/configuring_https_servers.html) for a quick guide on how to enable secure traffic to your NGINX installation.\n\n## Load Balancing\nFor a quick start guide on configuring NGINX as a Load Balancer, please see [Using nginx as HTTP load balancer](https://nginx.org/en/docs/http/load_balancing.html).\n\n## Rate limiting\nSee our [Rate Limiting with NGINX](https://blog.nginx.org/blog/rate-limiting-nginx) blog post for an overview of core concepts for provisioning NGINX as an API Gateway.\n\n## Content caching\nSee [A Guide to Caching with NGINX and NGINX Plus](https://blog.nginx.org/blog/nginx-caching-guide) blog post for an overview of how to use NGINX as a content cache (e.g. edge server of a content delivery network).\n\n# Building from source\nThe following steps can be used to build NGINX from source code available in this repository.\n\n## Installing dependencies\nMost Linux distributions will require several dependencies to be installed in order to build NGINX. The following instructions are specific to the `apt` package manager, widely available on most Ubuntu/Debian distributions and their derivatives.\n\n\u003e [!TIP]\n\u003e It is always a good idea to update your package repository lists prior to installing new packages.\n\u003e ```bash\n\u003e sudo apt update\n\u003e ```\n\n### Installing compiler and make utility\nUse the following command to install the GNU C compiler and Make utility.\n\n```bash\nsudo apt install gcc make\n```\n\n### Installing dependency libraries\n\n```bash\nsudo apt install libpcre3-dev zlib1g-dev\n```\n\n\u003e [!WARNING]\n\u003e 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.\n\n\u003e```bash\n\u003esudo apt install libssl-dev\n\n## Cloning the NGINX GitHub repository\nUsing 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.\n\n```bash\ngit clone https://github.com/nginx/nginx.git\n```\n\n## Configuring the build\nPrior 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).\n\nFrom the NGINX source code repository's root directory:\n\n```bash\nauto/configure\n```\n\n\u003e [!IMPORTANT]\n\u003e 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.\n\n## Compiling\nThe `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:\n\n```bash\nmake\n```\n\n## Location of binary and installation\nAfter successful compilation, a binary will be generated at `\u003cNGINX_SRC_ROOT_DIR\u003e/objs/nginx`. To install this binary, issue the following command from the source root directory:\n\n```bash\nsudo make install\n```\n\n\u003e [!IMPORTANT]\n\u003e The binary will be installed into the `/usr/local/nginx/` directory.\n\n## Running and testing the installed binary\nTo run the installed binary, issue the following command:\n\n```bash\nsudo /usr/local/nginx/sbin/nginx\n```\n\nYou may test NGINX operation using `curl`.\n\n```bash\ncurl localhost\n```\n\nThe output of which should start with:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\u003ctitle\u003eWelcome to nginx!\u003c/title\u003e\n```\n\n# Asking questions and reporting issues\nSee our [Support](SUPPORT.md) guidelines for information on how discuss the codebase, ask troubleshooting questions, and report issues.\n\n# Contributing code\nPlease see the [Contributing](CONTRIBUTING.md) guide for information on how to contribute code.\n\n# Additional help and resources\n- See the [NGINX Community Blog](https://blog.nginx.org/) for more tips, tricks and HOW-TOs related to NGINX and related projects.\n- Access [nginx.org](https://nginx.org/), your go-to source for all documentation, information and software related to the NGINX suite of projects.\n\n# Changelog\nSee our [changelog](https://nginx.org/en/CHANGES) to keep track of updates.\n\n# License\n[2-clause BSD-like license](LICENSE)\n\n---\nAdditional documentation available at: https://nginx.org/en/docs\n","funding_links":[],"categories":["C","HTTP 代理服务器","Observability","80","\u003e 10k ★","Uncategorized","Load Balancing \u0026 Ingress","Back-End Development","Application Recommendation","Web Servers","Инфраструктура и DevOps"],"sub_categories":["产品","Proxy","Uncategorized","📡 Web Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnginx%2Fnginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnginx%2Fnginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnginx%2Fnginx/lists"}