# Nginx

> A fast, free web server. It can also stand in front of your apps.

**Field:** Infrastructure  
**Category:** Web Serving & Nginx  
**Also known as:** Engine X, Nginx Web Server

## Think of it like

It is like a fast waiter. He can serve lots of tables at once.

## Definition

Nginx is a free, open-source web server. It can handle many visitors at once and use little memory. One master process reads the settings. Worker processes answer the requests. It often sits in front of apps as a reverse proxy. It can also serve files, handle TLS and cache answers.

## Example

Jack installs Nginx on his Ubuntu server. It sends his images straight from disk and passes every other request to his Node.js app.

## Example code

```console
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
$ sudo nginx -s reload
```

Test the settings first, then reload. If the new settings are broken, Nginx keeps the old ones.

## Why it matters

It is one of the most used web servers in the world. Most server guides you meet will use it.

## Common mistake

Changing the settings and reloading without a test. One typo can stop the reload, so run nginx -t first.

## Three principles

- **Many at once.** Built to handle lots of connections.
- **Master and workers.** One reads settings, the rest answer.
- **Proxy too.** It often stands in front of an app.

## Related terms

- [Web Server](https://learn.benibix.com/term/infrastructure/web-server)
- [Apache HTTP Server](https://learn.benibix.com/term/infrastructure/apache-http-server)
- [Reverse Proxy](https://learn.benibix.com/term/infrastructure/reverse-proxy)
- [nginx.conf](https://learn.benibix.com/term/infrastructure/nginx-configuration-file)
- [Nginx Server Block](https://learn.benibix.com/term/infrastructure/nginx-server-block)
- [Linux](https://learn.benibix.com/term/development/linux)

## Told apart from

- [Nginx vs Apache](https://learn.benibix.com/compare/nginx-vs-apache): People think Nginx and Apache are the same program under two names, and they are not. Both are free web servers. Nginx keeps its settings in a few main files and handles many visitors with little memory. Apache can also read a small settings file in each folder. That is handy on shared hosting, but slower.

![A browser on the left sends a request to a web server such as Nginx or Apache. The web server reads plain files straight from its document root folder, and passes every other request to an application server, which reads a database. Each request also adds one line to an access log file.](https://learn.benibix.com/diagrams/inf2-web-server.svg)

---

Source: https://learn.benibix.com/term/infrastructure/nginx
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
