Reverse Proxies: How One Web Request Reaches Another Server
A reverse proxy receives page requests on a website's behalf. It passes each request to a computer or program that provides the page, then brings the answer back to the browser. The browser talks to the intermediary while another machine may do the work.
A server is a computer or program that provides a service. The browser is the client, the program asking for that service. A reverse proxy sits on the website's side of their conversation, presenting the site to clients and handling communication with the servers behind it.
Those underlying servers are often called backend or upstream servers. Both terms describe where the proxy sends work next.
- Start tonight: the board, case, power supply and memory card are all in the box.
- Run a home lab, an ad blocker or a practice server on one small computer.
- Learn Linux hands-on without risking your main machine.
The request makes a second trip
Suppose a small organization has a website with public information and a booking application. It could configure a reverse proxy to send requests for the information pages to one server and requests for the booking application to another.
The browser requests a page from the public site. The proxy reads the request and uses its configuration to choose the destination. It then forwards the request to that server, receives the answer and sends a response to the browser.
The browser's connection to the proxy and the proxy's connection to the application are separate. The browser doesn't need to make the second connection itself.
NGINX, software that can serve as a reverse proxy, documents this request-and-response path. Its settings determine where requests go. Different paths within a website can lead to different underlying services, as in the booking example.
A Proxy for the Visitor or a Proxy for the Website?
The intermediary can also adjust a request as it forwards it. For example, NGINX allows changes to headers, the extra fields that carry information about a request. This is part of processing a request on the service's behalf, rather than simply passing unread bytes through a pipe.
Protection has to cover both connections
Encryption scrambles information so it can be read only with the appropriate digital key, data used by the encryption method to unlock it. Protected web connections use TLS, short for Transport Layer Security, to protect information while it travels.
When a browser's encrypted connection ends at the proxy, that protection covers the trip to the proxy. A separate connection carries the request onward. The website operator must decide how that second connection is protected.
NGINX treats securing traffic to upstream servers as its own configuration task. An encrypted first connection therefore doesn't establish that the next one is encrypted, too. Each connection needs its own protection.
- Run a test server or a home lab without giving up desk space.
- Start right away with 16GB of memory and a 500GB SSD already inside.
- Drive two 4K screens when it doubles as an everyday desktop.
One public service, several possible jobs
Once requests pass through a common intermediary, the operator can use that position to organize the work.
Load balancing distributes requests among servers according to configured rules. A reverse proxy can perform this job, but forwarding a request to one server doesn't require load balancing. Nor does the label promise that every server receives an equal share or that overload becomes impossible.
Another possible job is caching: keeping a reusable copy of a response so a later suitable request can be answered without asking the application to produce it again. Whether that happens depends on the software, configuration and response involved.
The HTTP standard describes a reverse proxy, also called a gateway, as an intermediary that can support these jobs. Which jobs it performs depends on how it is set up. A site operator also has to control direct access to the underlying server if requests must pass through the proxy.
What Changes When a Proxy Stands Between You and a Website?
“Reverse” describes whose side it serves
A forward proxy is an intermediary selected on the client side to make requests to other services. A reverse proxy receives requests on behalf of the service being visited.
Both handle traffic going out and answers coming back. “Forward” and “reverse” aren't descriptions of which direction the reply travels.
For the booking website, the reverse proxy lets one public service direct a page request to the information server and a booking request to the application. That choice happens behind the public address, in the proxy's configuration.
Web Servers: What Happens After the Browser Asks

TLS Protects the Connection. The Destination Still Gets the Data.

Forward Proxies: What That Extra Server Can See

QUOTE:
"Amateurs hack systems, professionals hack people."

