# Reverse Proxy

> A server in front of your apps. It takes each request and passes it on.

**Field:** Infrastructure  
**Category:** Web Serving & Nginx  
**Also known as:** Reverse Proxy Server

## Think of it like

It is like the front desk at an office. Visitors talk to the desk, and the desk passes notes in.

## Definition

A reverse proxy is a server that sits in front of your app servers and takes every request first. It passes each one on to a server behind it and sends the answer back. Visitors never talk to the app servers directly. On the way, it can handle TLS, cache answers, block bad traffic and share the load.

## Example

Lucy's shop app listens only on localhost port 3000. Nginx takes HTTPS requests on port 443 and passes them to the app.

## Example code

```nginx
location / {
    proxy_pass http://127.0.0.1:3000;
}
```

This one line hands every request on to the app that listens on port 3000.

## Why it matters

It gives many apps one safe front door. TLS, logs and limits are set up in one place.

## Common mistake

Mixing it up with a forward proxy. A forward proxy works for users going out. A reverse proxy works for servers taking requests in.

## Three principles

- **In front of servers.** Takes every request first.
- **Hides the back.** Visitors never reach the app directly.
- **Does extra jobs.** TLS, caching and limits.

## Related terms

- [Proxy Server](https://learn.benibix.com/term/infrastructure/proxy-server)
- [Load Balancer](https://learn.benibix.com/term/infrastructure/load-balancer)
- [Nginx](https://learn.benibix.com/term/infrastructure/nginx)
- [Application Server](https://learn.benibix.com/term/infrastructure/application-server)
- [TLS Certificate](https://learn.benibix.com/term/infrastructure/tls-certificate)
- [Content Delivery Network (CDN)](https://learn.benibix.com/term/infrastructure/content-delivery-network)

## Told apart from

- [Reverse Proxy vs Forward Proxy](https://learn.benibix.com/compare/reverse-proxy-vs-proxy-server): People think a reverse proxy is just a proxy, and the two face opposite ways. A forward proxy works for users. It sits in front of their browsers and goes out to the web for them. A reverse proxy works for servers. It sits in front of them and takes requests coming in. Both pass traffic on, which is why the names get mixed up.
- [Load Balancer vs Reverse Proxy](https://learn.benibix.com/compare/load-balancer-vs-reverse-proxy): People think a load balancer and a reverse proxy are two different kinds of server, and very often they are one and the same. A reverse proxy takes each request and passes it to a server behind it. A load balancer is a reverse proxy that shares the work across many servers. Nginx can do both jobs. With just one app server behind it, there is no load to share.

![Visitors on the left reach a nearby CDN server that keeps copies of files for as long as their Cache-Control header allows. Requests it cannot answer go on to the origin, where a reverse proxy takes them over HTTPS and passes them to two app servers behind it.](https://learn.benibix.com/diagrams/inf2-reverse-proxy.svg)

---

Source: https://learn.benibix.com/term/infrastructure/reverse-proxy
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.
