tp下载链接|nginx

作者: tp下载链接
2024-03-13 01:55:35

nginx

nginxenglishрусскийnewsaboutdownloadsecuritydocumentationfaqbookssupporttractwitterblogunitnjsnginxBasic HTTP server featuresOther HTTP server featuresMail proxy server featuresTCP/UDP proxy server featuresArchitecture and scalabilityTested OS and platforms

nginx [engine x] is an HTTP and reverse proxy server,

a mail proxy server,

and a generic TCP/UDP proxy server,

originally written by Igor Sysoev.

For a long time, it has been running

on many heavily loaded Russian sites including

Yandex,

Mail.Ru,

VK, and

Rambler.

According to Netcraft, nginx served or proxied

20.74%

busiest sites in February 2024.

Here are some of the success stories:

Dropbox,

Netflix,

Wordpress.com,

FastMail.FM.

The sources and documentation are distributed under the

2-clause BSD-like license.

Commercial support is available from

Nginx, Inc.

Basic HTTP server features

Serving static and

index

files,

autoindexing;

open file descriptor cache;

Accelerated

reverse proxying with caching;

load balancing

and fault tolerance;

Accelerated support with caching of

FastCGI,

uwsgi,

SCGI, and

memcached

servers;

load balancing

and fault tolerance;

Modular architecture.

Filters include

gzipping,

byte ranges, chunked responses,

XSLT,

SSI,

and image

transformation filter.

Multiple SSI inclusions within a single page can be processed in

parallel if they are handled by proxied or FastCGI/uwsgi/SCGI servers;

SSL and

TLS SNI support;

Support for HTTP/2

with weighted and dependency-based prioritization;

Support for HTTP/3.

Other HTTP server features

Name-based and IP-based

virtual servers;

Keep-alive

and pipelined connections support;

Access

log formats,

buffered

log writing,

fast log rotation, and

syslog logging;

3xx-5xx error codes

redirection;

The rewrite module:

URI changing

using regular expressions;

Executing

different functions depending on the

client address;

Access control based on

client IP address,

by password (HTTP

Basic authentication) and by the

result of

subrequest;

Validation of

HTTP referer;

The PUT, DELETE, MKCOL, COPY,

and MOVE methods;

FLV

and

MP4

streaming;

Response rate limiting;

Limiting the number of simultaneous

connections

or

requests

coming from one address;

IP-based geolocation;

A/B testing;

Request mirroring;

Embedded Perl;

njs scripting language.

Mail proxy server features

User redirection to

IMAP

or

POP3

server using an external HTTP

authentication

server;

User authentication using an external HTTP

authentication

server and connection redirection to an internal

SMTP server;

Authentication methods:

POP3:

USER/PASS, APOP, AUTH LOGIN/PLAIN/CRAM-MD5;

IMAP:

LOGIN, AUTH LOGIN/PLAIN/CRAM-MD5;

SMTP:

AUTH LOGIN/PLAIN/CRAM-MD5;

SSL support;

STARTTLS

and STLS support.

TCP/UDP proxy server features

Generic proxying

of TCP and UDP;

SSL and

TLS SNI support

for TCP;

Load balancing

and fault tolerance;

Access control based on

client address;

Executing different functions depending on the

client address;

Limiting the number of simultaneous

connections

coming from one address;

Access

log formats,

buffered

log writing,

fast log rotation, and

syslog logging;

IP-based geolocation;

A/B testing;

njs scripting language.

Architecture and scalability

One master and several worker processes;

worker processes run under an unprivileged user;

Flexible configuration;

Reconfiguration

and upgrade of an

executable without interruption of the client servicing;

Support for

kqueue (FreeBSD 4.1+),

epoll (Linux 2.6+),

/dev/poll (Solaris 7 11/99+), event ports (Solaris 10),

select, and poll;

The support of the various kqueue features including EV_CLEAR, EV_DISABLE

(to temporarily disable events), NOTE_LOWAT, EV_EOF, number of available data,

error codes;

The support of various epoll features including

EPOLLRDHUP (Linux 2.6.17+, glibc 2.8+) and

EPOLLEXCLUSIVE (Linux 4.5+, glibc 2.24+);

sendfile (FreeBSD 3.1+, Linux 2.2+, macOS 10.5+), sendfile64 (Linux 2.4.21+),

and sendfilev (Solaris 8 7/01+) support;

File AIO

(FreeBSD 4.3+, Linux 2.6.22+);

DIRECTIO

(FreeBSD 4.4+, Linux 2.4+, Solaris 2.6+, macOS);

Accept-filters (FreeBSD 4.1+, NetBSD 5.0+) and TCP_DEFER_ACCEPT (Linux 2.4+)

support;

10,000 inactive HTTP keep-alive connections take about 2.5M memory;

Data copy operations are kept to a minimum.

Tested OS and platforms

FreeBSD 3 — 12 / i386;

FreeBSD 5 — 12 / amd64;

FreeBSD 11 / ppc;

FreeBSD 12 / ppc64;

Linux 2.2 — 4 / i386;

Linux 2.6 — 5 / amd64;

Linux 3 — 4 / armv6l, armv7l, aarch64, ppc64le;

Linux 4 — 5 / s390x;

Solaris 9 / i386, sun4u;

Solaris 10 / i386, amd64, sun4v;

Solaris 11 / x86;

AIX 7.1 / powerpc;

HP-UX 11.31 / ia64;

macOS / ppc, i386, x86_64;

Windows XP,

Windows Server 2003,

Windows 7,

Windows 10.

What Is NGINX? - NGINX

What Is NGINX? - NGINX

Skip to content

<

Your Cookie Settings

Analytics cookies are off for visitors from the UK or EEA unless they click Accept or submit a form on nginx.com. They’re on by default for everybody else. Follow the instructions here to deactivate analytics cookies. This deactivation will work even if you later click Accept or submit a form.

Check this box so we and our advertising and social media partners can use cookies on nginx.com to better tailor ads to your interests. Uncheck it to withdraw consent.

Cookie preferences

Accept cookies for analytics, social media, and advertising, or learn more and adjust your preferences. These cookies are on by default for visitors outside the UK and EEA. Privacy Notice.

Accept

EN

EN中文日本語

F5 Sites

F5.comDevCentralMyF5Partner CentralLearnF5

Search

Contact F5 NGINX

F5 NGINX SalesF5 SupportF5 Professional Services

Solutions & Products

F5 NGINX Solutions

F5 NGINX Solutions

Explore the areas where NGINX can help your organization overcome specific technical challenges.

Solution Quick LinksCustomer Stories

Product Datasheets

Read the Blog

Application DeliveryKubernetesApp and API SecurityZero Trust

Web PerformanceCloudAPI GatewayLoad Balancer

Start Your Free Trial

Get Started

F5 NGINX Products

F5 NGINX Products

Improve the Security, Scalability, and Observability of your Applications.

Product Quick LinksProduct Documentation

Datasheets

Blog

NGINX PlusNGINX App ProtectNGINX Ingress ControllerNGINX Gateway Fabric

Instance ManagerNGINX AmplifyNGINX Unit

Start Your Free Trial

Get Started

F5 NGINX Packages

F5 NGINX Packages

Introducing NGINX OneNGINX Open Source Subscription BundlesNGINX Connectivity Stack for Kubernetes BundlesF5 NGINXaaS for Azure

Start Your Free Trial

Get Started

Resources

Resources View AllDatasheetsDocumentation

Product Documentation

Learn how to deliver, manage, and protect your applications using NGINX products. Find developer guides, API references, and more.

Learn More

Resources Quick LinksDocumentation

Webinars

Read the Blog

NGINX PlusNGINX App Protect DoSNGINX App Protect WAFNGINX Amplify

NGINX Management SuiteNGINX Ingress ControllerNGINX Unit

Start Your Free Trial

Get Started

Education

NGINX University

Learn about NGINX products, industry trends, and connect with the experts.

Learn More

Resources Quick LinksDocumentation

Webinars

Read the Blog

Ebooks & ReportsEventsFAQGlossary

TrainingWebinarsYoutube

Start Your Free Trial

Get Started

GitHubSuccess Stories

Blog

Blog View AllSolution Blogs

Solution Blogs

Get technical and business-oriented blogs that help you address key technology challenges.

Learn More

Application DeliverySecurityKubernetes

Blog Quick LinksTech Blogs

News Blogs

Opinion Blogs

Start Your Free Trial

Get Started

Product Blogs

Product Blogs

Learn how to use NGINX products to solve your technical challenges.

Learn More

Blog Quick LinksTech Blogs

News Blogs

Opinion Blogs

NGINX AmplifyNGINX App ProtectNGINX Ingress ControllerNGINX Management Suite

NGINX Open SourceNGINX PlusNGINX Unit

Start Your Free Trial

Get Started

Support

Support

Support Options and Resources

Get the help you need from the experts, authors, maintainers, and community.

Learn More

NGINX Support OptionsDevCentral (an F5 Community)MyF5 (Support Portal)Professional ServicesOpen Source Slack Community

NGINX Quick LinksDocumentation

Webinars

Read the Blog

Start Your Free Trial

Get Started

Partners

Explore Partners

NGINX Partners

Combine the power and performance of NGINX with a rich ecosystem of product integrations, custom solutions, services, and deployment options.

Learn More

All PartnersBecome a PartnerFind a ResellerExplore Tech PartnersFind an Authorized Consulting Partner

Partners Quick LinksAWS

Azure

Red Hat

Google

Start Your Free Trial

Get Started

Get F5 NGINX

Trials and PricingGitHubGet F5 NGINX

Get F5 NGINX

The NGINX Application Platform is a suite of products that together form the core of what organizations need to deliver applications with performance, reliability, security, and scale.

Learn More

Trials and PricingGitHub

NGINX Quick LinksDocumentation

Webinars

Read the Blog

Start Your Free Trial

Get Started

Free Trial

1-800-915-9122

Search

NGINX>Glossary>What Is NGINX? What Is NGINX?

NGINX is open source software for web serving, reverse proxying, caching, load balancing, media streaming, and more. It started out as a web server designed for maximum performance and stability. In addition to its HTTP server capabilities, NGINX can also function as a proxy server for email (IMAP, POP3, and SMTP) and a reverse proxy and load balancer for HTTP, TCP, and UDP servers.

Backstory

Igor Sysoev originally wrote NGINX to solve the C10K problem, a term coined in 1999 to describe the difficulty that existing web servers experienced in handling large numbers (the 10K) of concurrent connections (the C). With its event‑driven, asynchronous architecture, NGINX revolutionized how servers operate in high‑performance contexts and became the fastest web server available.

After open sourcing the project in 2004 and watching its use grow exponentially, Sysoev co‑founded NGINX, Inc. to support continued development of NGINX and to market NGINX Plus as a commercial product with additional features designed for enterprise customers. NGINX, Inc. became part of F5, Inc. in 2019. Today, NGINX and NGINX Plus can handle hundreds of thousands of concurrent connections, and power more of the Internet’s busiest sites than any other server.

NGINX as a Web Server

The goal behind NGINX was to create the fastest web server around, and maintaining that excellence is still a central goal of the project. NGINX consistently beats Apache and other servers in benchmarks measuring web server performance. Since the original release of NGINX, however, websites have expanded from simple HTML pages to dynamic, multifaceted content. NGINX has grown along with it and now supports all the components of the modern Web, including WebSocket, HTTP/2, gRPC, and streaming of multiple video formats (HDS, HLS, RTMP, and others).

NGINX Beyond Web Serving

Though NGINX became famous as the fastest web server, the scalable underlying architecture has proved ideal for many web tasks beyond serving content. Because it can handle a high volume of connections, NGINX is commonly used as a reverse proxy and load balancer to manage incoming traffic and distribute it to slower upstream servers – anything from legacy database servers to microservices.

NGINX also is frequently placed between clients and a second web server, to serve as an SSL/TLS terminator or web accelerator. Acting as an intermediary, NGINX efficiently handles tasks that might slow down your web server, such as negotiating SSL/TLS or compressing and caching content to improve performance. Dynamic sites, built using anything from Node.js to PHP, commonly deploy NGINX as a content cache and reverse proxy to reduce load on application servers and make the most effective use of the underlying hardware.

What Can NGINX and NGINX Plus Do for You?

NGINX Plus and NGINX are the best-in-class web server and application delivery solutions used by high‑traffic websites such as Dropbox, Netflix, and Zynga. More than 350 million websites worldwide rely on NGINX Plus and NGINX Open Source to deliver their content quickly, reliably, and securely.

As a software‑only all-in-one load balancer, web server, API gateway, and reverse proxy that is designed for cloud‑native architectures, NGINX helps you accelerate your IT infrastructure and application modernization efforts. NGINX Plus delivers enterprise‑grade capabilities that provide robust reliability and security.

NGINX is a multifunction tool. With NGINX, you can use the same tool as your load balancer, reverse proxy, content cache, and web server, minimizing the amount of tooling and configuration your organization needs to maintain. NGINX offers documentation and a wide array of eBooks, webinars, and videos to get you on your feet. NGINX Plus includes rapid‑response customer support, so you can easily get help diagnosing any part of your stack that uses NGINX or NGINX Plus.

NGINX keeps evolving. For the past decade NGINX has been at the forefront of development of the modern Web, and has helped lead the way on everything from HTTP/2 to microservices support. As development and delivery of web applications continue to evolve, NGINX Plus keeps adding features to enable flawless application delivery, from support for configuration using an implementation of JavaScript customized for NGINX, to support for dynamic modules. Using NGINX Plus ensures you’ll stay at the cutting edge of web performance.

Flawless Application Delivery

The world’s most innovative companies and largest enterprises rely on NGINX.

Learn more

Categories

Events

News

Tech

Opinion

Partners

More »

Top Posts

Stay in the Loop

Get Started

Try Out NGINX Plus on Your Turf

Get Started

Ask Us a Question

Contact Sales

Secure And Deliver Extraordinary Digital Experiences

F5 NGINX's portfolio of automation, security, performance, and insight capabilities empowers our customers to create, secure, and operate adaptive applications that reduce costs, improve operations, and better protect users.

What We Offer

Free Trial

Pricing

Products

F5 NGINX Solutions

NGINX Open Source

NGINX on Github

Resources

Documentation

Ebooks

Webinars

Datasheets

Success Stories

Blog

FAQ

Learn

Glossary

Support

Professional Services

Training

Customer Portal Login

Open Source Slack Community

Partners

NGINX on Amazon Web Services

NGINX on Google Cloud

IBM

NGINX on Microsoft Azure

NGINX and Red Hat

Find a Partner

Certified Module Program

Company

About F5 NGINX

F5 NGINX Careers

Press

Events

F5

Get NGINX Updates

Connect With Us

twitter

linkedin

facebook

youtube

rss

Copyright © F5, Inc. All rights reserved. | Trademarks | Policies | Privacy | California Privacy | Do Not Sell My Personal Information

Tags

thematic (4)

lightning talks (1)

NGINX Plus (164)

PHP (6)

load balancing (74)

reverse proxy s.. (18)

session persiste.. (7)

microservices (102)

monolithic appli.. (7)

refactoring (2)

service discovery (16)

inter-process co.. (3)

Microsoft Threat.. (1)

Stevie Award (2)

customer support (2)

DROWN (1)

CVE-2016-0800 (1)

OpenSSL (7)

Lua (6)

JavaScript (6)

CoreOS (1)

configuration e.. (26)

Docker (35)

static file cac.. (20)

microcaching (16)

web frontend (2)

Model View Contr.. (1)

etcd (4)

security certifi.. (9)

Let's Encrypt (5)

Drupal (3)

caching (23)

HTTP/2 (32)

MySQL (6)

database server (1)

web server (13)

pattern (1)

dynamic modules (16)

development (2)

cache placement (3)

tmpfs (1)

thread pools (5)

containers (21)

DevOps (50)

modern web (1)

HashiCorp (3)

byte-range caching (1)

OAuth (4)

NGINX Plus repos.. (2)

Facebook (1)

Google Plus (1)

multiplexing (1)

NGINX (11)

Netflix (7)

sendfile (1)

open source (14)

FreeBSD (2)

Symfony 2 (1)

C10K problem (2)

multiple applica.. (4)

Apache Tomcat (2)

SSL/TLS terminat.. (8)

dashboard (8)

NGINX Plus API (13)

monitoring (22)

Datadog (7)

Oracle WebLogic .. (1)

application hea.. (29)

application per.. (13)

Joomla (1)

CVE-2015-8562 (1)

Chef (6)

GitHub (9)

JBoss (1)

application deli.. (7)

scalability (4)

cloud (25)

application del.. (11)

vCloud Air (1)

VMware (1)

Photon OS (1)

5xx errors (1)

debug server (1)

service-oriented.. (1)

ProfitBricks (1)

high availabili.. (18)

Kubernetes (73)

Node.js (7)

WebSocket (11)

SSL/TLS (36)

Oracle E-Busines.. (1)

Black Friday (2)

survey (8)

KubeCon (1)

Google Cloud Eng.. (3)

Layer 4 (1)

Layer 7 (13)

smart sharding (1)

optimizations (3)

WordPress (5)

FastCGI (2)

Microsoft Azure (10)

training (5)

Amazon Web Serv.. (26)

application per.. (11)

Dynatrace (3)

rewrite rules (4)

permalinks (1)

session draining (1)

keepalive conne.. (10)

re:Invent (1)

ELK stack (1)

Go (2)

nginx.conf (18)

Google Cloud Pla.. (7)

virtual machine (3)

Dropbox (2)

Automattic (1)

nginx wiki (1)

TCP load balanc.. (13)

socket sharding (2)

dynamic reconfi.. (10)

API (27)

Ansible (10)

content delivery.. (6)

immutable infras.. (3)

high performance (3)

OSCON (1)

CVE-2015-1793 (1)

LDAP (2)

authentication (5)

professional ser.. (2)

consulting (1)

event loop (1)

benchmarking (3)

WebSphere (1)

API gateway (26)

video streaming (8)

HTTP Live Stream.. (4)

Red Hat Summit (1)

DevNation (1)

DockerCon (2)

MuleSoft (2)

Microsoft Exchange (1)

Mashape (1)

Gartner (4)

Kong (1)

live activity m.. (21)

CVE-2015-1635 (1)

NGINX Innovators.. (0)

NGINX User Summit (6)

continuous deliv.. (5)

Elasticsearch (2)

SCALE13x (1)

MaxCDN (1)

four-tier applic.. (1)

O'Reilly (4)

InkaBinka (1)

HP Moonshot (1)

Couchbase (1)

Discovery Educat.. (1)

support (2)

NGINX market pen.. (8)

Elastic Load Bal.. (5)

Galera Cluster (4)

management (2)

Socket.IO (1)

SELinux (1)

SSH (1)

New Relic (3)

CVE-2014-3566 (1)

security advisory (16)

CVE-2014-6271 (1)

SEO (2)

CloudFlare (1)

Python (5)

Velocity confere.. (3)

CVE-2014-0224 (1)

Elastic Compute .. (4)

Heartbleed (1)

Red Hat (17)

benchmark testing (1)

third-party modu.. (2)

UDP load balanc.. (12)

Internet of Thin.. (7)

beta (1)

monitoring and .. (11)

NGINX Microserv.. (15)

emoji (1)

Infrastructure a.. (1)

Community (4)

ZooKeeper (5)

Consul (5)

DNS SRV records (7)

hardware migration (6)

NGINX Amplify (25)

ephemeral port e.. (1)

performance comp.. (7)

monolithic archi.. (2)

microservices ar.. (9)

Interop (1)

application deve.. (9)

webinar (2)

real-time applic.. (2)

HSTS (HTTP Stric.. (1)

Globo.com (1)

DDoS (distribut.. (12)

debugging (2)

Google Chrome (1)

upgrades (6)

automation and .. (19)

agile development (3)

continuous integ.. (4)

Fabric Model in .. (4)

F5 BIG-IP (9)

OpenShift (11)

Proxy Model in N.. (4)

Certificate Auth.. (2)

vulnerability (3)

security (70)

exploit (2)

CGI (1)

nginx.conf 2016 (15)

Puppet (3)

Jenkins (1)

A/B testing (2)

secured URLs (1)

GPG key (1)

identity (1)

Librato (1)

alert (1)

Kibana (1)

Logstash (1)

ModSecurity web.. (16)

transparent proxy (1)

JSON Web Token .. (13)

idempotent (1)

NGINX Core train.. (1)

OpenID Connect (9)

IBM POWER (1)

Amazon Linux (1)

NGINX Plus on th.. (1)

single sign-on (.. (5)

IP Transparency (2)

Direct Server Re.. (2)

web application.. (24)

Router Mesh Mode.. (3)

application trac.. (3)

Twelve-Factor App (2)

Java (5)

eBook (3)

Image-Filter mod.. (1)

web (1)

CVE-2016-1546 (1)

e-commerce (3)

Amazon Route 53 (3)

global server lo.. (4)

deploy (1)

configuration an.. (3)

OpenStack (1)

OpenStack Heat (1)

cloud load bala.. (11)

nginx.conf 2015 (4)

Expedia (1)

circuit breaker .. (2)

Ingress control.. (33)

filter (1)

Docker Swarm (1)

application load.. (1)

cost savings (2)

features (1)

releases (63)

AppDynamics (2)

application arch.. (5)

HTTPS (1)

request routing (5)

URL rewrite (6)

CVEs (14)

container (3)

object storage (2)

cache sharding (1)

Arm (3)

Splunk Enterprise (2)

operational inte.. (1)

logging (8)

shared caches (1)

ASP.Net (1)

.NET Core (2)

Kestrel (1)

PageSpeed (1)

AWS Auto Scaling (3)

NGINX Plus clust.. (6)

configuration sh.. (1)

MQTT (MQ Telemet.. (4)

Mosquitto (2)

HiveMQ (2)

HTCPCP (1)

NGINX Plus Certi.. (6)

IDC Innovator (1)

nginx.conf 2017 (7)

virtual load bal.. (2)

Stealth Security (1)

Wallarm (1)

application (1)

OWASP CRS (2)

error/failure re.. (1)

nginx.conf 2014 (1)

install packages (3)

Elastic IP addre.. (2)

keepalived (2)

Lambda (1)

rate limiting (6)

BITMOVIN (1)

NGINX conference (4)

NGINX Controller (30)

NGINX Unit (44)

NGINX Applicati.. (10)

responsive web d.. (2)

modsec (1)

WURFL (3)

AWS NLB (2)

Istio (1)

service mesh (17)

key-value store (11)

HTTP/2 server push (2)

Microsoft Active.. (3)

gRPC (9)

IBM Cloud Private (1)

status (1)

configuration (4)

Hero (2)

Featured (11)

NGINX JavaScrip.. (42)

PCI DSS (2)

backend (1)

device detection (1)

NGINX Conf 2018 (6)

software (1)

video tutorial (2)

API management (27)

cookbook (1)

content cache (1)

cloud migration (1)

digital transfor.. (5)

process (0)

Cisco ACE (0)

web access manag.. (1)

IBM (2)

intrusion detect.. (1)

Random with Two .. (3)

dynamic applicat.. (1)

API Management .. (12)

Load Balancing M.. (1)

cloud native (3)

Signal Sciences (2)

blue-green deplo.. (4)

NGINX Conf 2019 (6)

sampling requests (1)

NetOps (13)

Ask NGINX (5)

application server (1)

regular expressi.. (1)

OpenTracing (3)

DNS (9)

canary release (4)

performance tes.. (10)

software load ba.. (4)

F5 acquisition (4)

NGINX Open Source (19)

Citrix ADC (2)

application isol.. (3)

Agility (4)

life at NGINX (3)

culture at NGINX (2)

real-time API (12)

assembly (1)

COVID-19 (4)

securing SSL keys (4)

DNS Load Balance.. (2)

NGINX App Protect (32)

Red Hat Enterpri.. (3)

HTTP/3 (8)

QUIC (8)

connection (1)

delivery (1)

NGINX Sprint 2020 (5)

NGINX Controller.. (1)

NGINX Load Balan.. (1)

NGINX Controller.. (1)

IP address denyl.. (1)

isolation (1)

filesystem isola.. (2)

FIPS (1)

compliance (1)

internal API (1)

CVE-2020-15598 (1)

NGINX Ingress C.. (81)

NGINX Service M.. (28)

F5 DNS Cloud Ser.. (3)

NGINX Analytics .. (1)

application serv.. (2)

SecOps (3)

network (1)

troubleshooting (2)

application secu.. (5)

DevSecOps (2)

NGINX for Good H.. (2)

multi-cloud (1)

hybrid cloud (1)

NGINX Controller.. (5)

Packer (1)

Terraform (1)

Gestalt IT (8)

self-service app.. (4)

F5 Beacon (1)

production-grad.. (50)

DoS (denial of s.. (3)

visibility (6)

insight (1)

Prometheus (6)

Grafana (4)

NGINX Instance M.. (5)

resilience (1)

Graviton2 (1)

mTLS (1)

F5 Device ID+ (1)

NGINX App Protec.. (9)

NGINX Sprint 2021 (3)

server overload (1)

website overload (1)

process isolation (2)

cgroups (1)

NGINX demo (2)

Platform Ops (1)

zero trust (3)

NGINX Modern App.. (6)

site reliability.. (1)

NGINX App Prote.. (18)

authorization (1)

tutorial (1)

Kernel TLS (kTLS) (2)

CVE-2021-44228 (1)

log4j (1)

Log4Shell (1)

cve-2021 (1)

Adaptive Apps (2)

Adaptive Applica.. (1)

Microservices M.. (19)

ALPN (1)

Kubernetes netwo.. (7)

Elastic stack (1)

NGINX Kubernetes.. (3)

Kubernetes Gatew.. (3)

Pulumi (1)

OpenTelemetry (O.. (9)

API security (8)

NGINXaaS for Azure (2)

machine learning.. (2)

NGINX Ingress re.. (4)

namespace isolat.. (1)

NGINX Sprint 2022 (4)

Prometheus-njs m.. (1)

NGINX Managemen.. (17)

API connectivity (16)

application conn.. (1)

distributed trac.. (1)

artificial intel.. (1)

API Connectivit.. (14)

Instance Manager (4)

WebAssembly (Wasm) (3)

OpenSSF (1)

MARA (1)

ExternalDNS (2)

cluster (1)

cert-manager (2)

API strategy (5)

API governance (1)

Amazon Elastic K.. (1)

PROXY protocol (1)

API sprawl (1)

NGINX Agent (2)

API-first (2)

reverse proxy (1)

calico (1)

secret (1)

observability (2)

NGINX Plus rele.. (34)

NGINX Management.. (3)

App Connectivity.. (2)

MQTT (1)

encryption (1)

APIs (1)

GraphQL (1)

App Delivery (1)

NGINX Gateway Fa.. (1)

rollback (1)

workflow (1)

gitops (1)

versioning (1)

AppWorld (0)

AI (1)

ML (1)

AI/ML (1)

NGINX One (1)

No More Tags to display

Show More Tags

Nginx - Wikipedia

Nginx - Wikipedia

Jump to content

Main menu

Main menu

move to sidebar

hide

Navigation

Main pageContentsCurrent eventsRandom articleAbout WikipediaContact usDonate

Contribute

HelpLearn to editCommunity portalRecent changesUpload file

Search

Search

Create account

Log in

Personal tools

Create account Log in

Pages for logged out editors learn more

ContributionsTalk

Contents

move to sidebar

hide

(Top)

1Popularity

2Features

Toggle Features subsection

2.1HTTP proxy and Web server features

2.2Mail proxy features

3Nginx vs Nginx Plus

4Nginx in comparison to Apache

5Nginx Unit

6History

7See also

8References

9External links

Toggle the table of contents

Nginx

34 languages

العربيةБългарскиCatalàČeštinaDanskDeutschEestiEspañolEsperantoفارسیFrançaisGalego한국어Bahasa IndonesiaItalianoעבריתКыргызчаLatviešuLombardBahasa MelayuNederlands日本語PolskiPortuguêsРусскийSlovenščinaСрпски / srpskiSuomiSvenskaతెలుగుTürkçeУкраїнська吴语中文

Edit links

ArticleTalk

English

ReadEditView history

Tools

Tools

move to sidebar

hide

Actions

ReadEditView history

General

What links hereRelated changesUpload fileSpecial pagesPermanent linkPage informationCite this pageGet shortened URLDownload QR codeWikidata item

Print/export

Download as PDFPrintable version

In other projects

Wikimedia CommonsWikiversity

From Wikipedia, the free encyclopedia

Open source web server and a reverse proxy server

NGINXOriginal author(s)Igor SysoevDeveloper(s)F5, Inc.Initial release4 October 2004; 19 years ago (2004-10-04)[1]Preview release1.25.4[2] 

/ 14 February 2024

Repositoryhg.nginx.org/nginx

Written inC[3]Operating systemBSD variants, HP-UX, IBM AIX, Linux, macOS, Solaris, Microsoft Windows,[4] and other *nix flavors[5]TypeWeb server, reverse/mail proxy serverLicenseNginx: BSD-2-Clause License[6] Nginx Plus: Proprietary software[7]Websitenginx.org

Nginx (pronounced "engine x"[8] /ˌɛndʒɪnˈɛks/ EN-jin-EKS, stylized as NGINX or nginx) is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Russian developer Igor Sysoev and publicly released in 2004.[9] Nginx is free and open-source software, released under the terms of the 2-clause BSD license. A large fraction of web servers use Nginx,[10] often as a load balancer.[11]

A company of the same name was founded in 2011 to provide support and NGINX Plus paid software.[12] In March 2019, the company was acquired by F5, Inc. for $670 million.[13]

Popularity[edit]

As of June 2022[update], W3Tech's web server count of all web sites ranked Nginx first with 33.6%. Apache was second at 31.4% and Cloudflare Server third at 21.6%.[14] As of March 2022[update], Netcraft estimated that Nginx served 22.01% of the million busiest websites with Apache a little ahead at 23.04%. Cloudflare at 19.53% and Microsoft Internet Information Services at 5.78% rounded out the top four servers for the busiest websites. Some of Netcraft's other statistics show Nginx ahead of Apache.[15]

A 2018 survey of Docker usage found that Nginx was the most commonly deployed technology in Docker containers.[16] In OpenBSD version 5.2 (November 2012), Nginx became part of the OpenBSD base system, providing an alternative to the system's fork of Apache 1.3, which it was intended to replace,[17] but later in version 5.7 (November 2014) it was removed in favor of OpenBSD's own httpd(8).[18][19]

Features[edit]

Nginx is easy to configure in order to serve static web content or to act as a proxy server.[20]

Nginx can be deployed to also serve dynamic content on the network using FastCGI, SCGI handlers for scripts, WSGI application servers or Phusion Passenger modules, and can serve as a software load balancer.[21][20]

Nginx uses an asynchronous event-driven approach, rather than threads, to handle requests.[22] Nginx's modular event-driven architecture can provide predictable performance under high loads.[23][24]

HTTP proxy and Web server features[edit]

Ability to handle more than 10,000 simultaneous connections with a low memory footprint (~2.5 MB per 10k inactive HTTP keep-alive connections)

Handling of static files, index files and auto-indexing

Reverse proxy with caching[25]

Load balancing[26] with in-band health checks[27]

TLS/SSL with SNI and OCSP stapling support, via OpenSSL

FastCGI, SCGI, uWSGI support with caching

gRPC support since March 2018, version 1.13.10.[28]

Name- and IP address-based virtual servers

IPv6-compatible

WebSockets since 1.3.13,[29] including acting as a reverse proxy and do load balancing of WebSocket applications.[30]

HTTP/1.1 Upgrade (101 Switching Protocols)[31]

HTTP/2 protocol support

HTTP/3 protocol support (experimental since 1.25.0)[32]

URL rewriting and redirection[33][34]

Mail proxy features[edit]

TLS/SSL support

STARTTLS support

SMTP,[35] POP3, and IMAP proxy

Requires authentication using an external HTTP server or by an authentication script[36][35]

Other features include upgrading executable and configuration without client connections loss,[37] and a module-based architecture with both core[38] and third-party module support.[39]

The paid Plus product includes additional features such as advanced load balancing and access to an expanded suite of metrics for performance monitoring.[40][41]

Nginx vs Nginx Plus[edit]

There are two versions of Nginx: Nginx Open Source and Nginx Plus.

Nginx Open Source is free and open-source software.

Nginx Plus is sold as a subscription model. It offers features in addition to Nginx Open Source, such as active health checks, session persistence based on cookies, DNS-service-discovery integration, Cache Purging API, AppDynamic, Datalog, Dynatrace New Relic plug-ins, Active-Active HA with config sync, Key-Value Store, on-the-fly with zero downtime updates upstream configurations, and key‑value stores using Nginx Plus API[42] and web application firewall (WAF) dynamic module.[43]

Nginx in comparison to Apache[edit]

Nginx was written with an explicit goal of outperforming the Apache web server.[44] While in the past Nginx used to outperform Apache, since Apache 2.4 they offer similar performance. [45][46] This former performance boost came at a cost of decreased flexibility, such as the ability to override system-wide access settings on a per-file basis (Apache accomplishes this with an .htaccess file, while Nginx has no such feature built in).[47][48]

Formerly, adding third-party modules to Nginx required recompiling the application from source with the modules statically linked. This was partially overcome in version 1.9.11 in February 2016, with the addition of dynamic module loading.[49] However, the modules still must be compiled at the same time as Nginx, and not all modules are compatible with this system; some require the older static linking process.[50]

Nginx Unit[edit]

Nginx Unit is an open-source web application server, released in 2017 by NGINX, Inc. to target multi-language microservices-based applications. The initial release supported applications written in Go, PHP, and Python.[51] By version 1.11.0, the support was extended to Java, Node.js, Perl, and Ruby applications; other features include dynamic configuration, request routing, and load balancing.[52][53]

History[edit]

Igor Sysoev began development of Nginx in 2002.[9] Originally, Nginx was developed to solve the C10k problem, and to fill the needs of multiple websites including the Rambler search engine and portal, for which it was serving 500 million requests per day by September 2008.[54]

Nginx Inc. was founded in July 2011 by Sysoev and Maxim Konovalov[12][55] to provide commercial products and support for the software.[56]

The company's principal place of business is San Francisco, California, while legally incorporated in British Virgin Islands.[12]

In October 2011, Nginx, Inc. raised $3 million from BV Capital, Runa Capital, and MSD Capital, Michael Dell's venture fund.[57]

The company announced commercial support options for companies using Nginx in production. Nginx offered commercial support in February 2012,[58][59] and paid Nginx Plus subscription in August 2013.[60] Support packages focus on installation, configuration, performance improvement, etc.[61] Support includes proactive notifications about major changes, security patches, updates and patches. Nginx, Inc. also offers consulting services to assist customers in custom configuration or adding additional features.[62]

In October 2013, Nginx, Inc. raised a $10 million series B investment round led by New Enterprise Associates.[63] That round included previous investors, as well as Aaron Levie, CEO and founder of Box.com.[64][65] In December 2014, Nginx raised a $20 million series B1 round led by New Enterprise Associates, with participation from e.ventures (formerly BV Capital), Runa Capital, Index Ventures and Nginx's own CEO Gus Robertson.[66][67]

In September 2017, Nginx announced an API management tool, NGINX Controller, which would build off of their API Gateway, NGINX Plus.[68][69] In October 2017, Nginx, Inc. announced general available Nginx Amplify SaaS providing monitoring and analytics capabilities for Nginx.[70]

In June 2018, Nginx, Inc. raised $43 million in Series C Funding in a round led by Goldman Sachs "to Accelerate Application Modernization and Digital Transformation for Enterprises".[71]

On 11 March 2019, F5, Inc. acquired Nginx, Inc. for US$670 million.[72]

On 12 December 2019, it was reported that the Moscow offices of Nginx Inc. had been raided by police, and that Sysoev and Konovalov had been detained. The raid was conducted under a search warrant connected to a copyright claim over Nginx by Rambler—which asserts that it owns all rights to the code because it was written while Sysoev was an employee of the company.[73] On 16 December 2019, Russian state lender Sberbank, which owns 46.5 percent of Rambler, called an extraordinary meeting of Rambler's board of directors asking Rambler's management team to request Russian law enforcement agencies cease pursuit of the criminal case, and begin talks with Nginx and with F5.[74]

On 18 January 2022, it was announced that Igor Sysoev was leaving Nginx and F5.[75]

In late 2022, Angie, an open source fork of Nginx was released by some of the former Nginx developers.[76][77] Igor Sysoev is not actively involved in this project.[78]

In February 2024, Maxim Dounin, one of Nginx's core developers, created a Nginx fork called freenginx. In the open letter announcing the creation, Maxim Dounin criticised F5's interference with Nginx's development.[79]

See also[edit]

Free and open-source software portal

Comparison of web server software

List of Apache–MySQL–PHP packages

Web accelerator

URL redirection § nginx rewrite

References[edit]

^ "CHANGES". Retrieved 16 May 2017.

^ "Changes with nginx 1.25.4 14 Feb 2024". 14 February 2024. Archived from the original on 15 February 2024. Retrieved 14 February 2024.

^ "The NGINX Open Source Project on Black Duck Open Hub". www.openhub.net. Retrieved 17 May 2023.

^ "nginx for Windows". Retrieved 28 May 2014.

^ "Tested OS and platforms". Retrieved 15 October 2011.

^ "Licensing". Retrieved 18 January 2013.

^ "End User License Agreement" (PDF). Retrieved 29 March 2020.

^ "Igor Sysoev". sysoev.ru. Retrieved 1 June 2018.

^ a b Tony Mobily (5 January 2012). "Interview with Igor Sysoev, author of Apache's competitor NGINX". Free Software Magazine. Archived from the original on 19 October 2013. Retrieved 18 October 2013.

^ Survey (31 July 2023). "July 2023 Web Server Survey | Netcraft". www.netcraft.com. Retrieved 26 August 2023.

^ "Use NGINX as a Front-end Proxy and Software Load Balancer". Retrieved 1 June 2018.

^ a b c "Notice of Exempt Offering of Securities". Form D. US Securities and Exchange Commission 17 October 2013. Retrieved 15 September 2016.

^ "F5 acquires NGINX for $670M to move into open-source, multi-cloud services". TechCrunch. 11 March 2019. Retrieved 12 March 2019.

^ "Usage Statistics of Web Servers". w3techs.com. Retrieved 18 June 2022.

^ "March 2022 Web Server Survey". Netcraft News. 29 March 2022. Retrieved 18 June 2022.

^ "8 surprising facts about real Docker adoption". 13 June 2018. Retrieved 21 June 2018.

^ "OpenBSD Upgrade Guide: 5.1 to 5.2". openbsd.org. 6 November 2012.

^ "Heads Up: Nginx Removed From Base".

^ "Upgrade Guide: 5.6 to 5.7". Retrieved 18 February 2024.

^ a b "Beginner's Guide". nginx.org. Retrieved 1 June 2018.

^ "Use NGINX as a Front-end Proxy and Software Load Balancer". Linode Guides & Tutorials. Retrieved 1 June 2018.

^ "Welcome to NGINX Wiki! - NGINX". nginx.com.

^ "The Architecture of Open Source Applications (Volume 2): nginx". aosabook.org. Retrieved 10 June 2015.

^ "How to Configure NGINX". Linode Guides & Tutorials. 8 March 2018.

^ "NGINX Docs | NGINX Reverse Proxy". NGINX Documentation.

^ "NGINX Docs | HTTP Load Balancing". NGINX Documentation.

^ "Module ngx_http_upstream_module". nginx.org. Retrieved 14 August 2012.

^ "Introducing gRPC Support with NGINX 1.13.10". NGINX. 17 March 2018.

^ "WebSocket proxying". nginx.org.

^ "Using NGINX as a WebSocket Proxy". NGINX. 17 May 2014.

^ "Proxy: support for connection upgrade (101 Switching Protocols)". trac.nginx.org. 19 February 2013. Retrieved 21 February 2013.

^ "Changes with nginx 1.25.0". nginx news. 23 May 2023. Retrieved 25 May 2023.

^ Murenin, Constantine A. (18 February 2013). "A dynamic web-site written wholly in nginx.conf? Introducing mdoc.su!". nginx@nginx.org (Mailing list). Retrieved 24 December 2014.

^ Murenin, Constantine A. (24 February 2013). "mdoc.su – Short manual page URLs for FreeBSD, OpenBSD, NetBSD and DragonFly BSD". Retrieved 24 December 2014.

^ a b "NGINX Docs | Configuring NGINX as a Mail Proxy Server". NGINX Documentation.

^ "Module ngx_mail_auth_http_module". nginx.org. Retrieved 13 September 2012.

^ "Official documentation: Controlling nginx". nginx.org. Retrieved 3 December 2011.

^ "nginx documentation". nginx.org. Retrieved 9 June 2015.

^ "3rdPartyModules – Nginx Community". wiki.nginx.org. Retrieved 9 June 2015.

^ "How to monitor NGINX". Datadog. 9 July 2015. Retrieved 9 July 2015.

^ "Application Load Balancing with NGINX Plus". NGINX. Retrieved 9 July 2015.

^ "Load balancing with NGINX Plus". Retrieved 1 June 2018.

^ "NGINX Plus is a software load balancer, web server, and content cache system". Retrieved 1 June 2018.

^ "NGINX vs. Apache: Our View of a Decade-Old Question". NGINX. 9 October 2015. Retrieved 28 December 2016.

^ "Apache httpd 2.4" (PDF). Archived (PDF) from the original on 27 January 2012. Retrieved 8 February 2012.

^ "Picking a Proxy Server". 14 April 2014. Archived from the original on 3 March 2016. Retrieved 19 February 2016.

^ Jankov, Tonino (13 June 2018). "Apache vs Nginx Performance: Optimization Techniques — SitePoint". SitePoint. Retrieved 22 October 2018.

^ "Which web server should you use — Apache or NGINX?". TechRepublic. 18 August 2023.

^ "CHANGES-1.10". nginx.org. 31 January 2017.

^ "Introducing Dynamic Modules in NGINX 1.9.11 - NGINX". NGINX. 9 February 2016. Retrieved 13 January 2017.

^ "Nginx goes beyond its server roots and launches its application platform". techcrunch.com. 6 September 2017. Retrieved 15 April 2020.

^ "CHANGES". unit.nginx.org. Retrieved 15 April 2020.

^ "March 2020 Web Server Survey". news.netcraft.com. 20 March 2020. Retrieved 15 April 2020.

^ "Nginx: the High-Performance Web Server and Reverse Proxy". Linux Journal. 1 September 2008. Retrieved 16 August 2009.

^ "Maxim Konovalov". NGINX. Retrieved 13 October 2019.

^ "Company". nginx.com. 3 January 2012. Retrieved 24 February 2012.

^ Natasha Starkell (11 October 2011). "Russian Nginx Raises $3 Million From International Investors". Techcrunch. Retrieved 20 November 2014.

^ Darryl K. Taft (8 February 2012). "NGINX Launches Commercial Support for Open-Source Web Server". e Week. Retrieved 18 October 2013.[permanent dead link]

^ Steven J. Vaughan-Nichols (8 February 2012). "Commercial Support now available for the open-source NGINX Web server". ZDNet Open Source blog. Retrieved 18 October 2013.

^ "Nginx Inc. Launches NGINX Plus". 22 August 2013.

^ Taft, Darryl K. (8 February 2012). "NGINX Launches Commercial Support for Open-Source Web Server". eweek.com. Retrieved 24 February 2012.[permanent dead link]

^ "Commercial Support now available for the open-source NGINX Web server". ZDNet. 8 February 2012. Retrieved 28 February 2012.

^ Sean Michael Kerner (16 October 2013). "Nginx Raises $10 Million in New Funding for Server Development". e Week. Retrieved 18 October 2013.[permanent dead link]

^ Frederic Lardinois (15 October 2013). "Nginx Raises $10M Series B Round Led By NEA". Techcrunch. Retrieved 20 November 2014.

^ Jolie O'Dell (15 October 2013). "Nginx ties up a sweet $10M funding deal and hundreds of millions of users". Venture Beat. Retrieved 18 October 2013.

^ Frederic Lardinois (9 December 2014). "Nginx Raises $20M Series B1 Round To Drive International Expansion". Techcrunch. Retrieved 9 December 2014.

^ Jordan Novet (9 December 2014). "Nginx gets $20M, because an open-source web server is just the beginning". VentureBeat. Retrieved 9 December 2014.

^ "NGINX releases its new NGINX Application Platform". SD Times. 6 September 2017. Retrieved 7 November 2018.

^ "Introducing NGINX API Management: Manage NGINX Plus API Gateways with NGINX Controller - NGINX". NGINX. 9 October 2018. Retrieved 7 November 2018.

^ "NGINX Amplify is Generally Available - NGINX". 1 October 2017. Retrieved 4 June 2018.

^ "NGINX Raises $43 Million in Series C Funding to Accelerate Application Modernization and Digital Transformation for Enterprises" (Press release). 20 June 2018. Retrieved 11 October 2018.

^ Vaughan-Nichols, Steven J. "F5 acquires NGINX: What to expect from the deal". ZDNet. Retrieved 12 December 2019.

^ Cimpanu, Catalin. "Russian police raid NGINX Moscow office". ZDNet. Retrieved 12 December 2019.

^ Tsydenova, Nadezhda (16 December 2019). "Russia's Rambler drops effort for criminal case against Nginx web server". Reuters. Retrieved 4 May 2020.

^ Whiteley, Rob (18 January 2022). "Do Svidaniya, Igor, and Thank You for NGINX". NGINX (Press release). Archived from the original on 19 January 2022. Retrieved 19 January 2022. we announce today Igor has chosen to step back from NGINX and F5 in order to spend more time with his friends and family and to pursue personal projects

^ Darkcrizt (3 November 2022). "Angie, the Nginx fork created by developers who left F5". Desde Linux. Retrieved 14 December 2023.

^ "Angie: A New NGINX Fork Developed by Some of Its Former Devs". Vuink.com. Retrieved 14 December 2023.

^ Borisov, Bobby (31 October 2022). "Angie: A New NGINX Fork Developed by Some of Its Former Devs". Linuxiac. Retrieved 14 December 2023.

^ Larabel, Michael (14 February 2024). "Core NGINX Developer Forks Web Server Into Freenginx". www.phoronix.com. Retrieved 15 February 2024.

External links[edit]

Official website

Angie

FreeNginx

vteWeb server softwareComparisonsMost popular

Apache

Nginx

IIS

IIS Express

Other

AOLserver

Caddy

Caudium

Cherokee

GlassFish

Gunicorn

H2O

Hiawatha

iPlanet

Jetty

JEUS

Jexus

JOnAS

Lighttpd

LiteSpeed Web Server

Mongoose

Mongrel2

Monkey

NaviServer

NetWeaver

OpenResty

Passenger

Paste

POCO

Puma

Resin

Roxen

thttpd

Tomcat

Tornado

Traffic Server

Twisted

WebLogic

WEBrick

WebSphere

WildFly

Yaws

Zope

Retired

Boa

CERN httpd

Mongrel

NCSA HTTPd

Xitami

Zeus

Retrieved from "https://en.wikipedia.org/w/index.php?title=Nginx&oldid=1210850385"

Categories: 2002 softwareCompanies established in 2011Cross-platform free softwareFree proxy serversFree software programmed in CFree web server softwareProxy server software for LinuxReverse proxySoftware companies of RussiaSoftware using the BSD licenseUnix network-related softwareWeb server softwareWeb server software for LinuxRussian inventionsHidden categories: All articles with dead external linksArticles with dead external links from August 2023Articles with permanently dead external linksArticles with dead external links from March 2023Articles with short descriptionShort description matches WikidataUse dmy dates from January 2022Articles containing potentially dated statements from June 2022All articles containing potentially dated statementsArticles containing potentially dated statements from March 2022

This page was last edited on 28 February 2024, at 17:06 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0;

additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.

Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view

Toggle limited content width

Advanced Load Balancer, Web Server, & Reverse Proxy - NGINX

Advanced Load Balancer, Web Server, & Reverse Proxy - NGINX

Skip to content

<

Your Cookie Settings

Analytics cookies are off for visitors from the UK or EEA unless they click Accept or submit a form on nginx.com. They’re on by default for everybody else. Follow the instructions here to deactivate analytics cookies. This deactivation will work even if you later click Accept or submit a form.

Check this box so we and our advertising and social media partners can use cookies on nginx.com to better tailor ads to your interests. Uncheck it to withdraw consent.

Cookie preferences

Accept cookies for analytics, social media, and advertising, or learn more and adjust your preferences. These cookies are on by default for visitors outside the UK and EEA. Privacy Notice.

Accept

EN

EN中文日本語

F5 Sites

F5.comDevCentralMyF5Partner CentralLearnF5

Search

Contact F5 NGINX

F5 NGINX SalesF5 SupportF5 Professional Services

Solutions & Products

F5 NGINX Solutions

F5 NGINX Solutions

Explore the areas where NGINX can help your organization overcome specific technical challenges.

Solution Quick LinksCustomer Stories

Product Datasheets

Read the Blog

Application DeliveryKubernetesApp and API SecurityZero Trust

Web PerformanceCloudAPI GatewayLoad Balancer

Start Your Free Trial

Get Started

F5 NGINX Products

F5 NGINX Products

Improve the Security, Scalability, and Observability of your Applications.

Product Quick LinksProduct Documentation

Datasheets

Blog

NGINX PlusNGINX App ProtectNGINX Ingress ControllerNGINX Gateway Fabric

Instance ManagerNGINX AmplifyNGINX Unit

Start Your Free Trial

Get Started

F5 NGINX Packages

F5 NGINX Packages

Introducing NGINX OneNGINX Open Source Subscription BundlesNGINX Connectivity Stack for Kubernetes BundlesF5 NGINXaaS for Azure

Start Your Free Trial

Get Started

Resources

Resources View AllDatasheetsDocumentation

Product Documentation

Learn how to deliver, manage, and protect your applications using NGINX products. Find developer guides, API references, and more.

Learn More

Resources Quick LinksDocumentation

Webinars

Read the Blog

NGINX PlusNGINX App Protect DoSNGINX App Protect WAFNGINX Amplify

NGINX Management SuiteNGINX Ingress ControllerNGINX Unit

Start Your Free Trial

Get Started

Education

NGINX University

Learn about NGINX products, industry trends, and connect with the experts.

Learn More

Resources Quick LinksDocumentation

Webinars

Read the Blog

Ebooks & ReportsEventsFAQGlossary

TrainingWebinarsYoutube

Start Your Free Trial

Get Started

GitHubSuccess Stories

Blog

Blog View AllSolution Blogs

Solution Blogs

Get technical and business-oriented blogs that help you address key technology challenges.

Learn More

Application DeliverySecurityKubernetes

Blog Quick LinksTech Blogs

News Blogs

Opinion Blogs

Start Your Free Trial

Get Started

Product Blogs

Product Blogs

Learn how to use NGINX products to solve your technical challenges.

Learn More

Blog Quick LinksTech Blogs

News Blogs

Opinion Blogs

NGINX AmplifyNGINX App ProtectNGINX Ingress ControllerNGINX Management Suite

NGINX Open SourceNGINX PlusNGINX Unit

Start Your Free Trial

Get Started

Support

Support

Support Options and Resources

Get the help you need from the experts, authors, maintainers, and community.

Learn More

NGINX Support OptionsDevCentral (an F5 Community)MyF5 (Support Portal)Professional ServicesOpen Source Slack Community

NGINX Quick LinksDocumentation

Webinars

Read the Blog

Start Your Free Trial

Get Started

Partners

Explore Partners

NGINX Partners

Combine the power and performance of NGINX with a rich ecosystem of product integrations, custom solutions, services, and deployment options.

Learn More

All PartnersBecome a PartnerFind a ResellerExplore Tech PartnersFind an Authorized Consulting Partner

Partners Quick LinksAWS

Azure

Red Hat

Google

Start Your Free Trial

Get Started

Get F5 NGINX

Trials and PricingGitHubGet F5 NGINX

Get F5 NGINX

The NGINX Application Platform is a suite of products that together form the core of what organizations need to deliver applications with performance, reliability, security, and scale.

Learn More

Trials and PricingGitHub

NGINX Quick LinksDocumentation

Webinars

Read the Blog

Start Your Free Trial

Get Started

Free Trial

1-800-915-9122

Search

NGINX Overcome the Challenges of Modern App Delivery

Introducing NGINX One: A SaaS solution for modern application management and delivery

Learn More

API Strategy: Best Practices for Platform Engineering Leaders

Learn how to secure and scale your API operations, fight API sprawl, and build a resilient API platform with F5 NGINX.

Learn More

Get Hands-On with NGINX and QUIC+HTTP/3

Learn about the benefits of the new QUIC+HTTP/3 protocol and how to configure NGINX for QUIC in this webinar and hands-on lab.

Learn More

Security as Code

In this eBook from O'Reilly Media, compliments of NGINX, learn how to implement a DevSecOps strategy by integrating security early into your development process through cloud infrastructure on AWS.

Learn More

Improve the Performance, Reliability, and Security of Your Applications

App Delivery

Kubernetes

API Connectivity

App & API Security

To complete a cloud migration and close a legacy data center, Modern Hire had to meet a financial customer’s needs for advanced security, including SSL offloading backed by a hardware security module (HSM), despite reliance on server software not supported by its cloud provider for HSM services.

Learn how Modern Hire used the NGINX App Delivery solution to achieve rapid implementation, reduced complexity, and more granular insights.

Learn More

Audi’s Kubernetes Competence Centre conceived Kubika O as a cloud‑independent Kubernetes platform operating as a seamless application environment. The big challenge ahead of launch was deciding how to secure everything. Audi needed a proven WAF solution with certified Red Hat OpenShift interoperability, plus robust, 24/7 technical support.

Learn how Audi used the NGINX Kubernetes solution to future-proof their Kubernetes tech vision and app innovation.

Flexible Microservices

Learn how you can deploy NGINX on any cloud, eliminate vendor lock‑in, and reduce complexity. Digital businesses rely on internal and external APIs to compete. Trust NGINX Plus and NGINX Controller to manage and secure your business‑critical APIs.

Learn More

See how Distil Networks prevents security breaches and limits malicious traffic with NGINX Plus and the NGINX ModSecurity WAF. Reduce security breaches and limit your company’s exposure to malicious users with NGINX Plus and NGINX App Protect.

Multi-Layer Security

Deliver Modern Applications at Scale with F5 NGINX

Deploy app and APIs faster and with more confidence than ever before.

NGINX Open Source

The open source web server that powers more than 400 million websites.

 

NGINX Plus

The all-in-one load balancer, reverse proxy, web server, content cache, and API gateway.

 

NGINX Management Suite

Visibility and control of NGINX instances, application delivery services, API management workflows, and security solutions.

 

NGINX App Protect

Modern WAF and Denial of Service to protect apps and APIs.

 

NGINX Ingress Controller

Kubernetes traffic management with API gateway, identity, and observability features.

 

NGINX Unit

Open source web and application server.

 

NGINX Amplify

SaaS monitoring and static analysis for NGINX Open Source and NGINX Plus.

 

Trusted by More of the World’s Busiest Sites than Any Other Server

Read Success Stories

New From The F5 NGINX Blog

Blog

Scale, Secure, and Monitor AI/ML Workloads in Kubernetes with Ingress Controllers

Learn how to simplify and streamline model serving, experimentation, monitoring, and security for AI/ML workloads using Ingress controllers and F5 NGINX Connectivity Stack for Kubernetes.

 

Blog

NGINX One: A SaaS Solution for Modern Application Management and Delivery

NGINX One will soon be available “as-a-service,” with a single license and a unified management console for enterprise-wide security, availability, observability, and scalability.

 

Blog

Microservices and Kubernetes: A Gardening Guide to Software Ecosystems

Do microservices, containers, and Kubernetes make your head spin? Read this article to gain an understanding of these technologies and how they interrelate.

 

Get Started

Try Out NGINX Plus on Your Turf

Get Started

Ask Us a Question

Contact Sales

Secure And Deliver Extraordinary Digital Experiences

F5 NGINX's portfolio of automation, security, performance, and insight capabilities empowers our customers to create, secure, and operate adaptive applications that reduce costs, improve operations, and better protect users.

What We Offer

Free Trial

Pricing

Products

F5 NGINX Solutions

NGINX Open Source

NGINX on Github

Resources

Documentation

Ebooks

Webinars

Datasheets

Success Stories

Blog

FAQ

Learn

Glossary

Support

Professional Services

Training

Customer Portal Login

Open Source Slack Community

Partners

NGINX on Amazon Web Services

NGINX on Google Cloud

IBM

NGINX on Microsoft Azure

NGINX and Red Hat

Find a Partner

Certified Module Program

Company

About F5 NGINX

F5 NGINX Careers

Press

Events

F5

Get NGINX Updates

Connect With Us

twitter

linkedin

facebook

youtube

rss

Copyright © F5, Inc. All rights reserved. | Trademarks | Policies | Privacy | California Privacy | Do Not Sell My Personal Information

nginx: download

nginx: downloadenglishрусскийnewsaboutdownloadsecuritydocumentationfaqbookssupporttractwitterblogunitnjsnginx: downloadMainline versionCHANGESnginx-1.25.4  pgpnginx/Windows-1.25.4  pgpStable versionCHANGES-1.24nginx-1.24.0  pgpnginx/Windows-1.24.0  pgpLegacy versionsCHANGES-1.22nginx-1.22.1  pgpnginx/Windows-1.22.1  pgpCHANGES-1.20nginx-1.20.2  pgpnginx/Windows-1.20.2  pgpCHANGES-1.18nginx-1.18.0  pgpnginx/Windows-1.18.0  pgpCHANGES-1.16nginx-1.16.1  pgpnginx/Windows-1.16.1  pgpCHANGES-1.14nginx-1.14.2  pgpnginx/Windows-1.14.2  pgpCHANGES-1.12nginx-1.12.2  pgpnginx/Windows-1.12.2  pgpCHANGES-1.10nginx-1.10.3  pgpnginx/Windows-1.10.3  pgpCHANGES-1.8nginx-1.8.1  pgpnginx/Windows-1.8.1  pgpCHANGES-1.6nginx-1.6.3  pgpnginx/Windows-1.6.3  pgpCHANGES-1.4nginx-1.4.7  pgpnginx/Windows-1.4.7  pgpCHANGES-1.2nginx-1.2.9  pgpnginx/Windows-1.2.9  pgpCHANGES-1.0nginx-1.0.15  pgpnginx/Windows-1.0.15  pgpCHANGES-0.8nginx-0.8.55  pgpnginx/Windows-0.8.55  pgpCHANGES-0.7nginx-0.7.69  pgpnginx/Windows-0.7.69  pgpCHANGES-0.6nginx-0.6.39  pgpCHANGES-0.5nginx-0.5.38  pgpSource Code

Read-only Mercurial repositories:

code: http://hg.nginx.org/nginx

site: http://hg.nginx.org/nginx.org

Trac source browser

Pre-Built Packages

Linux packages for

stable and mainline versions.

What Is Nginx? A Basic Look at What It Is and How It Works

What Is Nginx? A Basic Look at What It Is and How It Works

Skip to content

Kinsta®

Navigation

Hosting Services

Products

Managed WordPress Hosting

Web Application Hosting

Managed Database Hosting

Static Site Hosting

Platform highlights

Cloudflare integration

API

Expert support

WordPress highlights

APM tool

DevKinsta

Free site migrations

Edge caching

Add-ons

Solutions

We power your

Enterprise

Agency

WooCommerce store

Small business

Non-profit organization

Single high-resource site

Case studies

How Doyuk scaled business globally with Kinsta’s high-performance, reliable hosting

UNICEF Denmark saves 88% in hosting costs with Kinsta

More case studies

Pricing

Docs

Help

Resources

Blog

Changelog

System status

Knowledge Base

Compare Kinsta to competitors

Development tools

All resources

Contact us

Send us a question

Call sales

Request a live demo

Ask the community

Search

Login

Sign up

Home

Resource Center

Knowledge Base

Online Marketing Tips

What Is Nginx? A Basic Look at What It Is and How It Works

What Is Nginx? A Basic Look at What It Is and How It Works

Last updated: August 14, 2023

Nginx, pronounced like “engine-ex”, is an open-source web server that, since its initial success as a web server, is now also used as a reverse proxy, HTTP cache, and load balancer.

Some high-profile companies using Nginx include Autodesk, Atlassian, Intuit, T-Mobile, GitLab, DuckDuckGo, Microsoft, IBM, Google, Adobe, Salesforce, VMWare, Xerox, LinkedIn, Cisco, Facebook, Target, Citrix Systems, Twitter, Apple, Intel, and many more (source).

Nginx was originally created by Igor Sysoev, with its first public release in October 2004. Igor initially conceived the software as an answer to the C10k problem, which is a problem regarding the performance issue of handling 10,000 concurrent connections.

Because its roots are in performance optimization under scale, Nginx often outperforms other popular web servers in benchmark tests, especially in situations with static content and/or high concurrent requests, which is why Kinsta uses Nginx to power its hosting.

How Does Nginx Work?

Nginx vs Apache Usage Stats

How to Check If You’re Running NGINX or Apache

How Does Nginx Work?

Nginx is built to offer low memory usage and high concurrency. Rather than creating new processes for each web request, Nginx uses an asynchronous, event-driven approach where requests are handled in a single thread.

With Nginx, one master process can control multiple worker processes. The master maintains the worker processes, while the workers do the actual processing. Because Nginx is asynchronous, each request can be executed by the worker concurrently without blocking other requests.

Some common features seen in Nginx include:

Reverse proxy with caching

IPv6

Load balancing

FastCGI support with caching

WebSockets

Handling of static files, index files, and auto-indexing

TLS/SSL with SNI

At Kinsta, you can check out Nginx and all of our other premium add ons.

Nginx vs Apache Usage Stats

Apache is another popular open-source web server. In terms of raw numbers, Apache is the most popular web server in existence and is used by 43.6% (down from 47% in 2018) of all websites with a known web server, according to W3Techs. Nginx comes in a close second at 41.8%.

Netcraft ran a survey across 233 million domains and found Apache usage at 31.54% and Nginx usage at 26.20%.

Web server developers: market share of domains (Image source: Netcraft)

While Apache is the most popular overall option, Nginx is actually the most popular web server among high-traffic websites.

When you break down usage rates by traffic, Nginx powers:

60.9% of the 100,000 most popular sites (up from 56.1% in 2018)

67.1% of the 10,000 most popular sites (up from 63.2% in 2018)

62.1% of the 1,000 most popular sites (up from 57% in 2018)

In fact, Nginx is used by some of the most resource-intensive sites in existence, including Netflix, NASA, and even WordPress.com.

Apache’s usage, on the other hand, moves in the opposite direction as a site’s traffic increases. It powers:

24.0% of the 100,000 most popular sites (down from 27.1% in 2018)

18.8% of the 10,000 most popular sites (down from 21.5% in 2018)

16.6% of the 1,000 most popular sites (up from 16.2% in 2018)

If we take a look at Google Search terms since 2004 we can see that Apache has been on a steady decline, while NGINX has seen slight growth.

Nginx vs Apache

Again, when you consider that NGINX performs better under scale, it’s not surprising that high-traffic websites opt for NGINX over Apache. Check out our more in-depth comparison of Nginx vs Apache.

How to Check If You’re Running Nginx or Apache

On most websites, you can simply check the server HTTP header to see if it says Nginx or Apache. You can see HTTP headers by launching the network tab in Chrome Devtools. Or you can check headers in a tool like Pingdom or GTmetrix.

However, the HTTP header might not always reveal the underlying web server. For example, if your WordPress site is behind a proxy service such as Cloudflare, the server HTTP header will then say cloudflare instead.

Nginx HTTP Header

Get all your applications, databases, and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

Easy setup and management in the MyKinsta dashboard

24/7 expert support

The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability

An enterprise-level Cloudflare integration for speed and security

Global audience reach with up to 36 data centers and 260 PoPs worldwide

Get started with a free trial of our Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Related Articles

What Is the Default MySQL Port Number?

The number of ports used by MySQL depends on several factors but the default MySQL port is 3306. Learn more about it & how to connect to a MySQL da…

Reading time

3 min read

Updated date

January 12, 2024

Post type

Knowledge Base

Topic

MySQL Database

What is the WordPress .htaccess File?

The .htaccess file is a basic configuration file used by the Apache web server to let you create special rules that tell your web server how to fun…

Reading time

7 min read

Updated date

January 12, 2024

Post type

Knowledge Base

Topic

WordPress Tips

What is a Taxonomy? WordPress Taxonomies Explained

Wondering what is a taxonomy? This in-depth post will take you through everything there is to know about WordPress taxonomies, categories, and tags.

Reading time

6 min read

Updated date

December 13, 2022

Post type

Knowledge Base

Topic

WordPress Tips

Products

Managed WordPress Hosting

Web Application Hosting

Managed Database Hosting

Static Site Hosting

Pricing

Feature highlights

Cloudflare integration

Kinsta API

Expert support

Free WordPress migrations

APM tool

DevKinsta

Edge Caching

WordPress plan add-ons

Use cases

Enterprise

Agency

WooCommerce store

Small business

Non-profit organization

Single high-resource site

Case studies

Resources

Documentation

Changelog

Blog

Newsletter

Knowledge Base

Development tools

Kinsta vs competitors

Agency directory

System Status

All resources

Company

About us

Why choose Kinsta

Careers

Partners

Research program

Affiliate program

Press

Security and trust

Contact Us

Kinsta on GitHub

Kinsta on Twitter

Kinsta on YouTube

Kinsta on Facebook

Kinsta on LinkedIn

Switch languageDanskDeutschEnglishEspañolFrançaisItalianoNederlands日本語PortuguêsSvenska

© 2024 Kinsta Inc. All rights reserved.

Kinsta® and WordPress® are registered trademarks.

Legal information.

nginx documentation

nginx documentationenglishрусскийnewsaboutdownloadsecuritydocumentationfaqbookssupporttractwitterblogunitnjsnginx documentationIntroduction

Installing nginx

Building nginx from Sources

Beginner’s Guide

Admin’s Guide

Controlling nginx

Connection processing methods

Setting up hashes

A debugging log

Logging to syslog

Configuration file measurement units

Command-line parameters

nginx for Windows

Support for QUIC and HTTP/3

How nginx processes a request

Server names

Using nginx as HTTP load balancer

Configuring HTTPS servers

How nginx processes a TCP/UDP session

Scripting with njs

Chapter “nginx” in

“The Architecture of Open Source Applications”

How-To

Building nginx on the Win32 platform with Visual C

Setting up NGINX Plus environment on Amazon EC2

Debugging nginx with DTrace pid provider

Converting rewrite rules

WebSocket proxying

Development

Contributing Changes

Development guide

Modules reference

Alphabetical index of directives

Alphabetical index of variables

Core functionality

ngx_http_core_module

ngx_http_access_module

ngx_http_addition_module

ngx_http_api_module

ngx_http_auth_basic_module

ngx_http_auth_jwt_module

ngx_http_auth_request_module

ngx_http_autoindex_module

ngx_http_browser_module

ngx_http_charset_module

ngx_http_dav_module

ngx_http_empty_gif_module

ngx_http_f4f_module

ngx_http_fastcgi_module

ngx_http_flv_module

ngx_http_geo_module

ngx_http_geoip_module

ngx_http_grpc_module

ngx_http_gunzip_module

ngx_http_gzip_module

ngx_http_gzip_static_module

ngx_http_headers_module

ngx_http_hls_module

ngx_http_image_filter_module

ngx_http_index_module

ngx_http_internal_redirect_module

ngx_http_js_module

ngx_http_keyval_module

ngx_http_limit_conn_module

ngx_http_limit_req_module

ngx_http_log_module

ngx_http_map_module

ngx_http_memcached_module

ngx_http_mirror_module

ngx_http_mp4_module

ngx_http_perl_module

ngx_http_proxy_module

ngx_http_proxy_protocol_vendor_module

ngx_http_random_index_module

ngx_http_realip_module

ngx_http_referer_module

ngx_http_rewrite_module

ngx_http_scgi_module

ngx_http_secure_link_module

ngx_http_session_log_module

ngx_http_slice_module

ngx_http_split_clients_module

ngx_http_ssi_module

ngx_http_ssl_module

ngx_http_status_module

ngx_http_stub_status_module

ngx_http_sub_module

ngx_http_upstream_module

ngx_http_upstream_conf_module

ngx_http_upstream_hc_module

ngx_http_userid_module

ngx_http_uwsgi_module

ngx_http_v2_module

ngx_http_v3_module

ngx_http_xslt_module

ngx_mail_core_module

ngx_mail_auth_http_module

ngx_mail_proxy_module

ngx_mail_realip_module

ngx_mail_ssl_module

ngx_mail_imap_module

ngx_mail_pop3_module

ngx_mail_smtp_module

ngx_stream_core_module

ngx_stream_access_module

ngx_stream_geo_module

ngx_stream_geoip_module

ngx_stream_js_module

ngx_stream_keyval_module

ngx_stream_limit_conn_module

ngx_stream_log_module

ngx_stream_map_module

ngx_stream_mqtt_preread_module

ngx_stream_mqtt_filter_module

ngx_stream_proxy_module

ngx_stream_proxy_protocol_vendor_module

ngx_stream_realip_module

ngx_stream_return_module

ngx_stream_set_module

ngx_stream_split_clients_module

ngx_stream_ssl_module

ngx_stream_ssl_preread_module

ngx_stream_upstream_module

ngx_stream_upstream_hc_module

ngx_stream_zone_sync_module

ngx_google_perftools_module

ngx_mgmt_module

ngx_otel_module

NGINX Reverse Proxy | NGINX Documentation

NGINX Reverse Proxy | NGINX Documentation

Explore All Products

Home

NGINX Plus

Admin Guide

Web Server

NGINX Reverse Proxy

NGINX Plus

Admin Guide

Installing NGINX and NGINX Plus

Installing NGINX Plus

Installing NGINX Open Source

Installing NGINX Plus AMIs on Amazon EC2

Installing NGINX Plus on the Google Cloud Platform

Installing NGINX Plus on Microsoft Azure

Deploying NGINX and NGINX Plus on Docker

Basic Functionality

Controlling NGINX Processes at Runtime

Creating NGINX Plus and NGINX Configuration Files

Load Balancer

HTTP Load Balancing

TCP and UDP Load Balancing

HTTP Health Checks

TCP Health Checks

UDP Health Checks

gRPC Health Checks

Dynamic Configuration of Upstreams with the NGINX Plus API

Accepting the PROXY Protocol

Content Cache

NGINX Content Caching

Web Server

Configuring NGINX and NGINX Plus as a Web Server

Serving Static Content

NGINX Reverse Proxy

Compression and Decompression

Using NGINX and NGINX Plus as an Application Gateway with uWSGI and Django

Security Controls

NGINX SSL Termination

SSL Termination for TCP Upstream Servers

Restricting Access with HTTP Basic Authentication

Authentication Based on Subrequest Result

Setting up JWT Authentication

Limiting Access to Proxied HTTP Resources

Restricting Access to Proxied TCP Resources

Restricting Access by Geographical Location

Securing HTTP Traffic to Upstream Servers

Securing TCP Traffic to Upstream Servers

Dynamic Denylisting of IP Addresses

Monitoring

Live Activity Monitoring

Configuring Logging

Debugging NGINX

NGINX Diagnostic Package

Monitoring NGINX and NGINX Plus with the New Relic Plug-In

Reporting NGINX Plus Installation Counts for Compliance

High Availability

High Availability Support for NGINX Plus in On-Premises Deployments

Configuring Active-Active High Availability and Additional Passive Nodes with keepalived

Synchronizing NGINX Configuration in a Cluster

Runtime State Sharing in a Cluster

How NGINX Plus Performs Zone Synchronization

Dynamic Modules

Dynamic Modules

Brotli

Cookie-Flag

Encrypted-Session

FIPS Status Check

GeoIP

GeoIP2

Headers-More

HTTP Substitutions Filter

Image-Filter

Lua

NGINX Developer Kit

NGINX ModSecurity WAF

njs Scripting Language

OpenTelemetry

OpenTracing

Perl

Phusion Passenger Open Source

Prometheus-njs

RTMP

Set-Misc

SPNEGO

Uninstalling a dynamic module

XSLT

Mail Proxy

Configuring NGINX as a Mail Proxy Server

Deployment Guides

Set Up Single Sign-On for Proxied Applications

Single Sign-On With Auth0

Single Sign-On with Amazon Cognito

Single Sign-On with Keycloak

Single Sign-On with Microsoft Active Directory FS

Single Sign-On with Okta

Single Sign-On with OneLogin

Single Sign-On with Ping Identity

Amazon Web Services

Active-Active HA for NGINX Plus on AWS Using AWS Network Load Balancer

Active-Passive HA for NGINX Plus on AWS Using Elastic IP Addresses

Global Server Load Balancing with Amazon Route 53 and NGINX Plus

Using NGINX or NGINX Plus as the Ingress Controller for Amazon Elastic Kubernetes Services

Creating Amazon EC2 Instances for NGINX Open Source and NGINX Plus

Global Server Load Balancing

Global Server Load Balancing with NS1 and NGINX Plus

Google Cloud Platform

All-Active HA for NGINX Plus on the Google Cloud Platform

Load Balancing Third-Party Servers

Load Balancing Apache Tomcat Servers with NGINX Open Source and NGINX Plus

Load Balancing Microsoft Exchange Servers with NGINX Plus

Load Balancing Node.js Application Servers with NGINX Open Source and NGINX Plus

Load Balancing Oracle E-Business Suite with NGINX Plus

Load Balancing Oracle WebLogic Server with NGINX Open Source and NGINX Plus

Load Balancing Wildfly and JBoss Application Servers with NGINX Open Source and NGINX Plus

Microsoft Azure

Active-Active HA for NGINX Plus on Microsoft Azure Using the Azure Standard Load Balancer

Creating Microsoft Azure Virtual Machines for NGINX Open Source and NGINX Plus

Migrate Hardware ADCs

Migrating Load Balancer Configuration from Citrix ADC to NGINX Plus

Migrating Load Balancer Configuration from F5 BIG-IP LTM to NGINX Plus

Setting Up an NGINX Demo Environment

Releases

Technical Specs

Open Source Components

NGINX Plus FIPS Compliance

NGINX Directives Index

NGINX Reverse Proxy

Configure NGINX as a reverse proxy for HTTP and other protocols, with support for modifying request headers and fine-tuned buffering of responses.

This article describes the basic configuration of a proxy server. You will learn how to pass a request from NGINX to proxied servers over different protocols, modify client request headers that are sent to the proxied server, and configure buffering of responses coming from the proxied servers.

Introduction

Proxying is typically used to distribute the load among several servers, seamlessly show content from different websites, or pass requests for processing to application servers over protocols other than HTTP.

Passing a Request to a Proxied Server

When NGINX proxies a request, it sends the request to a specified proxied server, fetches the response, and sends it back to the client. It is possible to proxy requests to an HTTP server (another NGINX server or any other server) or a non-HTTP server (which can run an application developed with a specific framework, such as PHP or Python) using a specified protocol. Supported protocols include FastCGI, uwsgi, SCGI, and memcached.

To pass a request to an HTTP proxied server, the proxy_pass directive is specified inside a location. For example:

location /some/path/ {

proxy_pass http://www.example.com/link/;

}

This example configuration results in passing all requests processed in this location to the proxied server at the specified address. This address can be specified as a domain name or an IP address. The address may also include a port:

location ~ \.php {

proxy_pass http://127.0.0.1:8000;

}

Note that in the first example above, the address of the proxied server is followed by a URI, /link/. If the URI is specified along with the address, it replaces the part of the request URI that matches the location parameter. For example, here the request with the /some/path/page.html URI will be proxied to http://www.example.com/link/page.html. If the address is specified without a URI, or it is not possible to determine the part of URI to be replaced, the full request URI is passed (possibly, modified).

To pass a request to a non-HTTP proxied server, the appropriate **_pass directive should be used:

fastcgi_pass passes a request to a FastCGI server

uwsgi_pass passes a request to a uwsgi server

scgi_pass passes a request to an SCGI server

memcached_pass passes a request to a memcached server

Note that in these cases, the rules for specifying addresses may be different. You may also need to pass additional parameters to the server (see the reference documentation for more detail).

The proxy_pass directive can also point to a named group of servers. In this case, requests are distributed among the servers in the group according to the specified method.

Passing Request Headers

By default, NGINX redefines two header fields in proxied requests, “Host” and “Connection”, and eliminates the header fields whose values are empty strings. “Host” is set to the $proxy_host variable, and “Connection” is set to close.

To change these setting, as well as modify other header fields, use the proxy_set_header directive. This directive can be specified in a location or higher. It can also be specified in a particular server context or in the http block. For example:

location /some/path/ {

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_pass http://localhost:8000;

}

In this configuration the “Host” field is set to the $host variable.

To prevent a header field from being passed to the proxied server, set it to an empty string as follows:

location /some/path/ {

proxy_set_header Accept-Encoding "";

proxy_pass http://localhost:8000;

}

Configuring Buffers

By default NGINX buffers responses from proxied servers. A response is stored in the internal buffers and is not sent to the client until the whole response is received. Buffering helps to optimize performance with slow clients, which can waste proxied server time if the response is passed from NGINX to the client synchronously. However, when buffering is enabled NGINX allows the proxied server to process responses quickly, while NGINX stores the responses for as much time as the clients need to download them.

The directive that is responsible for enabling and disabling buffering is proxy_buffering. By default it is set to on and buffering is enabled.

The proxy_buffers directive controls the size and the number of buffers allocated for a request. The first part of the response from a proxied server is stored in a separate buffer, the size of which is set with the proxy_buffer_size directive. This part usually contains a comparatively small response header and can be made smaller than the buffers for the rest of the response.

In the following example, the default number of buffers is increased and the size of the buffer for the first portion of the response is made smaller than the default.

location /some/path/ {

proxy_buffers 16 4k;

proxy_buffer_size 2k;

proxy_pass http://localhost:8000;

}

If buffering is disabled, the response is sent to the client synchronously while it is receiving it from the proxied server. This behavior may be desirable for fast interactive clients that need to start receiving the response as soon as possible.

To disable buffering in a specific location, place the proxy_buffering directive in the location with the off parameter, as follows:

location /some/path/ {

proxy_buffering off;

proxy_pass http://localhost:8000;

}

In this case NGINX uses only the buffer configured by proxy_buffer_size to store the current part of a response.

A common use of a reverse proxy is to provide load balancing. Learn how to improve power, performance, and focus on your apps with rapid deployment in the free Five Reasons to Choose a Software Load Balancer ebook.

Choosing an Outgoing IP Address

If your proxy server has several network interfaces, sometimes you might need to choose a particular source IP address for connecting to a proxied server or an upstream. This may be useful if a proxied server behind NGINX is configured to accept connections from particular IP networks or IP address ranges.

Specify the proxy_bind directive and the IP address of the necessary network interface:

location /app1/ {

proxy_bind 127.0.0.1;

proxy_pass http://example.com/app1/;

}

location /app2/ {

proxy_bind 127.0.0.2;

proxy_pass http://example.com/app2/;

}

The IP address can be also specified with a variable. For example, the $server_addr variable passes the IP address of the network interface that accepted the request:

location /app3/ {

proxy_bind $server_addr;

proxy_pass http://example.com/app3/;

}

What's on This Page

Introduction

Passing a Request to a Proxied Server

Passing Request Headers

Configuring Buffers

Choosing an Outgoing IP Address

Found a bug? Looking for something new?

Let Us Know

Company

About F5 NGINX

Events

Resources

Blog

FAQ

Professional Services

Training

Products

NGINX Plus

NGINX App Protect

NGINX Amplify

NGINX Management Suite

NGINX Ingress Controller

NGINX Service Mesh

NGINX Unit

NGINX on GitHub

NGINX Open Source

NGINX Unit

NGINX Amplify

NGINX Agent

NGINX Kubernetes Ingress Controller

NGINX Microservices Reference Architecture

NGINX Crossplane

Social

Facebook

Twitter

LinkedIn

YouTube

RSS

Copyright © F5, Inc. All rights reserved.Trademarks | Policies | Open Source Components | Privacy | California Privacy | Do Not Sell My Personal Information |

What is nginx? | DigitalOcean

is nginx? | DigitalOceanBlogDocsGet SupportContact SalesProductsFeatured ProductsDropletsScalable virtual machinesKubernetesManaged Kubernetes clustersPaperspaceBuild & scale AI modelsCloudwaysManaged cloud hostingApp PlatformGet apps to market fasterDatabasesWorry-free setup & maintenanceComputeDropletsCPU-Optimized DropletsKubernetesApp PlatformFunctionsGPUsBackups & SnapshotsBackupsSnapshotsSnapShooterCloudways AutonomousStorageSpaces Object StorageVolumes Block StorageNetworkingVirtual Private Cloud (VPC)Cloud FirewallsLoad BalancersDNSDDoS ProtectionManaged DatabasesMongoDBKafkaMySQLPostgreSQLManaged Databases for Redis®Developer ToolsAPICLISupport PlansMonitoringUptimeAI/MLPaperspaceCloud Website HostingCloudwaysSee all productsSee what's new at DigitalOceanSolutionsCloudwaysManaged WordPressMake your website faster and more secure.Managed WoocommerceHassle-free ecommerce website hosting.Managed MagentoSimple, efficient ecommerce hosting.By industryData AnalyticsDigital Marketing AgenciesEcommerceAdvertising and Marketing TechISVs build, scale and growIT ConsultingDeveloper ToolsCI/CD PipelinesView All IndustriesBy use caseCloud VPNWeb & Mobile AppsGame DevelopmentVideo StreamingVirtual MachinesBlockchainWebsite HostingVPS HostingView All Use CasesQuestions?Speak With an ExpertSee all solutionsDevelopersOur communityDeveloper CenterLearn, build, and scale.Community HomeDevOps and development guides.CSS-TricksAll things web design.ResourcesTutorialsQuestions And AnswersMarketplaceToolsWrite for DOnationsCustomer StoriesDigitalOcean BlogGet InvolvedHatch Startup ProgramOpen Source SponsorshipsHacktoberfestDO ImpactNonprofitsDocumentationQuick StartDropletsStorageApp PlatformAPI ReferenceDomains and DNSBusinessesGrow your businessThe WaveContent to level up your business.Find a partnerWork with a partner to get up and running in the cloud.Become a partnerJoin our Partner Pod to connect with SMBs and startups like yoursUGURUSElite training for agencies & freelancers.ResourcesCustomer StoriesHatch Startup ProgramPrice Estimate CalculatorOne-Click AppsSecurityMigrate Workloads to DigitalOceanFeatured articlesCloud cost optimization best practicesRead moreHow to choose a cloud providerRead moreUnderstanding cash flow vs. profitRead moreContactDo you have any questions?Contact salesPricingLog inLog in to:CommunityDigitalOceanSign upSign up for:CommunityDigitalOceanBlogDocsGet SupportSalesTutorialsQuestionsLearning PathsFor BusinessesProduct DocsSocial ImpactSearch CommunityTutorialWhat is nginx?Published on January 20, 2021GlossaryNginxBy Lyn MuldrowSenior Developer EducatorNginx, pronounced engine-x, is an open source web server used for serving static or dynamic websites, reverse proxying, load balancing, and other HTTP and proxy server capabilities.

Created in 2004 by Igor Sysoev to handle large amounts of concurrent connections, Nginx is a popular web server used to host some of the largest and most high-traffic sites on the internet.

To learn more about Nginx, visit our comprehensive list of resources related to Nginx.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about us

About the authorsLyn MuldrowauthorSenior Developer EducatorSoftware engineer, writer, and speaker who loves solving problems and educating the next generation.

Still looking for an answer?Ask a questionSearch for more helpWas this helpful?YesNo CommentsThis work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.Try DigitalOcean for freeClick below to sign up and get $200 of credit to try our products over 60 days!Sign upPopular TopicsUbuntuLinux BasicsJavaScriptPythonMySQLDockerKubernetesAll tutorialsTalk to an expertJoin the Tech TalkSuccess! Thank you! Please check your email for further details.Please complete your information!Get our biweekly newsletterSign up for Infrastructure as a Newsletter.Sign upHollie's Hub for GoodWorking on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.Learn moreBecome a contributorGet paid to write technical tutorials and select a tech-focused charity to receive a matching donation.Learn moreFeatured on CommunityKubernetes CourseLearn Python 3Machine Learning in PythonGetting started with GoIntro to KubernetesDigitalOcean ProductsCloudwaysVirtual MachinesManaged DatabasesManaged KubernetesBlock StorageObject StorageMarketplaceVPCLoad BalancersWelcome to the developer cloudDigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.Learn moreCompanyAboutLeadershipBlogCareersCustomersPartnersReferral ProgramAffiliate ProgramPressLegalPrivacy PolicySecurityInvestor RelationsDO ImpactNonprofitsProductsProducts OverviewDropletsKubernetesPaperspaceApp PlatformFunctionsCloudwaysManaged DatabasesSpacesMarketplaceLoad BalancersBlock StorageTools & IntegrationsAPIPricingDocumentationRelease NotesUptimeCommunityTutorialsQ&ACSS-TricksWrite for DOnationsCurrents ResearchHatch Startup ProgramShop SwagResearch ProgramOpen SourceCode of ConductNewsletter SignupMeetupsSolutionsWebsite HostingVPS HostingWeb & Mobile AppsGame DevelopmentStreamingVPNSaaS PlatformsCloud Hosting for BlockchainStartup ResourcesContactSupportSalesReport AbuseSystem StatusShare your ideasCompanyAboutLeadershipBlogCareersCustomersPartnersReferral ProgramAffiliate ProgramPressLegalPrivacy PolicySecurityInvestor RelationsDO ImpactNonprofitsProductsProducts OverviewDropletsKubernetesPaperspaceApp PlatformFunctionsCloudwaysManaged DatabasesSpacesMarketplaceLoad BalancersBlock StorageTools & IntegrationsAPIPricingDocumentationRelease NotesUptimeCommunityTutorialsQ&ACSS-TricksWrite for DOnationsCurrents ResearchHatch Startup ProgramShop SwagResearch ProgramOpen SourceCode of ConductNewsletter SignupMeetupsSolutionsWebsite HostingVPS HostingWeb & Mobile AppsGame DevelopmentStreamingVPNSaaS PlatformsCloud Hosting for BlockchainStartup ResourcesContactSupportSalesReport AbuseSystem StatusShare your ideas© 2024 DigitalOcean, LLC.Sitem

Beginner’s Guide

Beginner’s GuideenglishрусскийnewsaboutdownloadsecuritydocumentationfaqbookssupporttractwitterblogunitnjsBeginner’s GuideStarting, Stopping, and Reloading ConfigurationConfiguration File’s StructureServing Static ContentSetting Up a Simple Proxy ServerSetting Up FastCGI Proxying

This guide gives a basic introduction to nginx and describes some

simple tasks that can be done with it.

It is supposed that nginx is already installed on the reader’s machine.

If it is not, see the Installing nginx page.

This guide describes how to start and stop nginx, and reload its

configuration, explains the structure

of the configuration file and describes how to set up nginx

to serve out static content, how to configure nginx as a proxy

server, and how to connect it with a FastCGI application.

nginx has one master process and several worker processes.

The main purpose of the master process is to read and evaluate configuration,

and maintain worker processes.

Worker processes do actual processing of requests.

nginx employs event-based model and OS-dependent mechanisms to efficiently

distribute requests among worker processes.

The number of 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 (see

worker_processes).

The way nginx and its modules work is determined in the configuration file.

By default, the configuration file is named nginx.conf

and placed in the directory

/usr/local/nginx/conf,

/etc/nginx, or

/usr/local/etc/nginx.

Starting, Stopping, and Reloading Configuration

To start nginx, run the executable file.

Once nginx is started, it can be controlled by invoking the executable

with the -s parameter.

Use the following syntax:

nginx -s signal

Where signal may be one of the following:

stop — fast shutdown

quit — graceful shutdown

reload — reloading the configuration file

reopen — reopening the log files

For example, to stop nginx processes with waiting for the worker processes

to finish serving current requests, the following command can be executed:

nginx -s quit

This command should be executed under the same user that

started nginx.

Changes made in the configuration file

will not be applied until the command to reload configuration is

sent to nginx or it is restarted.

To reload configuration, execute:

nginx -s reload

Once the master process receives the signal to reload configuration,

it checks the syntax validity

of the new configuration file and tries to apply the configuration provided

in it.

If this is a success, the master process starts new worker processes

and sends messages to old worker processes, requesting them to

shut down.

Otherwise, the master process rolls back the changes and

continues to work with the old configuration.

Old worker processes, receiving a command to shut down,

stop accepting new connections and continue to service current requests until

all such requests are serviced.

After that, the old worker processes exit.

A signal may also be sent to nginx processes with the help of Unix tools

such as the kill utility.

In this case a signal is sent directly to a process with a given process ID.

The process ID of the nginx master process is written, by default, to the

nginx.pid in the directory

/usr/local/nginx/logs or

/var/run.

For example, if the master process ID is 1628, to send the QUIT signal

resulting in nginx’s graceful shutdown, execute:

kill -s QUIT 1628

For getting the list of all running nginx processes, the ps

utility may be used, for example, in the following way:

ps -ax | grep nginx

For more information on sending signals to nginx, see

Controlling nginx.

Configuration File’s Structure

nginx consists of modules which are controlled by directives specified

in the configuration file.

Directives are divided into simple directives and block directives.

A simple directive consists of the name and parameters separated by spaces

and ends with a semicolon (;).

A block directive has the same structure as a simple directive, but

instead of the semicolon it ends with a set of additional instructions

surrounded by braces ({ and }).

If a block directive can have other directives inside braces,

it is called a context (examples:

events,

http,

server,

and

location).

Directives placed in the configuration file outside

of any contexts are considered to be in the

main context.

The events and http directives

reside in the main context, server

in http, and location in

server.

The rest of a line after the # sign is considered a comment.

Serving Static Content

An important web server task is serving out

files (such as images or static HTML pages).

You will implement an example where, depending on the request,

files will be served from different local directories: /data/www

(which may contain HTML files) and /data/images

(containing images).

This will require editing of the configuration file and setting up of a

server

block inside the http

block with two location

blocks.

First, create the /data/www directory and put an

index.html file with any text content into it and

create the /data/images directory and place some

images in it.

Next, open the configuration file.

The default configuration file already includes several examples of

the server block, mostly commented out.

For now comment out all such blocks and start a new

server block:

http {

server {

}

}

Generally, the configuration file may include several

server blocks

distinguished by ports on which

they listen to

and by

server names.

Once nginx decides which server processes a request,

it tests the URI specified in the request’s header against the parameters of the

location directives defined inside the

server block.

Add the following location block to the

server block:

location / {

root /data/www;

}

This location block specifies the

“/” prefix compared with the URI from the request.

For matching requests, the URI will be added to the path specified in the

root

directive, that is, to /data/www,

to form the path to the requested file on the local file system.

If there are several matching location blocks nginx

selects the one with the longest prefix.

The location block above provides the shortest

prefix, of length one,

and so only if all other location

blocks fail to provide a match, this block will be used.

Next, add the second location block:

location /images/ {

root /data;

}

It will be a match for requests starting with /images/

(location / also matches such requests,

but has shorter prefix).

The resulting configuration of the server block should

look like this:

server {

location / {

root /data/www;

}

location /images/ {

root /data;

}

}

This is already a working configuration of a server that listens

on the standard port 80 and is accessible on the local machine at

http://localhost/.

In response to requests with URIs starting with /images/,

the server will send files from the /data/images directory.

For example, in response to the

http://localhost/images/example.png request nginx will

send the /data/images/example.png file.

If such file does not exist, nginx will send a response

indicating the 404 error.

Requests with URIs not starting with /images/ will be

mapped onto the /data/www directory.

For example, in response to the

http://localhost/some/example.html request nginx will

send the /data/www/some/example.html file.

To apply the new configuration, start nginx if it is not yet started or

send the reload signal to the nginx’s master process,

by executing:

nginx -s reload

In case something does not work as expected, you may try to find out

the reason in access.log and

error.log files in the directory

/usr/local/nginx/logs or

/var/log/nginx.

Setting Up a Simple Proxy Server

One of the frequent uses of nginx is setting it up as a proxy server, which

means a server that receives requests, passes them to the proxied servers,

retrieves responses from them, and sends them to the clients.

We will configure a basic proxy server, which serves requests of

images with files from the local directory and sends all other requests to a

proxied server.

In this example, both servers will be defined on a single nginx instance.

First, define the proxied server by adding one more server

block to the nginx’s configuration file with the following contents:

server {

listen 8080;

root /data/up1;

location / {

}

}

This will be a simple server that listens on the port 8080

(previously, the listen directive has not been specified

since the standard port 80 was used) and maps

all requests to the /data/up1 directory on the local

file system.

Create this directory and put the index.html file into it.

Note that the root directive is placed in the

server context.

Such root directive is used when the

location block selected for serving a request does not

include its own root directive.

Next, use the server configuration from the previous section

and modify it to make it a proxy server configuration.

In the first location block, put the

proxy_pass

directive with the protocol, name and port of the proxied server specified

in the parameter (in our case, it is http://localhost:8080):

server {

location / {

proxy_pass http://localhost:8080;

}

location /images/ {

root /data;

}

}

We will modify the second location

block, which currently maps requests with the /images/

prefix to the files under the /data/images directory,

to make it match the requests of images with typical file extensions.

The modified location block looks like this:

location ~ \.(gif|jpg|png)$ {

root /data/images;

}

The parameter is a regular expression matching all URIs ending

with .gif, .jpg, or .png.

A regular expression should be preceded with ~.

The corresponding requests will be mapped to the /data/images

directory.

When nginx selects a location block to serve a request

it first checks location

directives that specify prefixes, remembering location

with the longest prefix, and then checks regular expressions.

If there is a match with a regular expression, nginx picks this

location or, otherwise, it picks the one remembered earlier.

The resulting configuration of a proxy server will look like this:

server {

location / {

proxy_pass http://localhost:8080/;

}

location ~ \.(gif|jpg|png)$ {

root /data/images;

}

}

This server will filter requests ending with .gif,

.jpg, or .png

and map them to the /data/images directory (by adding URI to the

root directive’s parameter) and pass all other requests

to the proxied server configured above.

To apply new configuration, send the reload signal to

nginx as described in the previous sections.

There are many more

directives that may be used to further configure a proxy connection.

Setting Up FastCGI Proxying

nginx can be used to route requests to FastCGI servers which run

applications built with various frameworks and programming languages

such as PHP.

The most basic nginx configuration to work with a FastCGI server

includes using the

fastcgi_pass

directive instead of the proxy_pass directive,

and fastcgi_param

directives to set parameters passed to a FastCGI server.

Suppose the FastCGI server is accessible on localhost:9000.

Taking the proxy configuration from the previous section as a basis,

replace the proxy_pass directive with the

fastcgi_pass directive and change the parameter to

localhost:9000.

In PHP, the SCRIPT_FILENAME parameter is used for

determining the script name, and the QUERY_STRING

parameter is used to pass request parameters.

The resulting configuration would be:

server {

location / {

fastcgi_pass localhost:9000;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param QUERY_STRING $query_string;

}

location ~ \.(gif|jpg|png)$ {

root /data/images;

}

}

This will set up a server that will route all requests except for

requests for static images to the proxied server operating on

localhost:9000 through the FastCGI protocol.