Home > Backend Development > PHP Tutorial > Getting started with nginx (1) - Reverse proxy

Getting started with nginx (1) - Reverse proxy

WBOY
Release: 2016-07-29 09:01:35
Original
1262 people have browsed it

Reverse proxy

The explanation on Baidu Encyclopedia is as follows:

Reverse Proxy method refers to using a proxy server to accept connection requests on the Internet, and then forwards the request to the server on the internal network, and The results obtained from the server are returned to the client requesting a connection on the Internet. At this time, the proxy server appears as a reverse proxy server to the outside world.

Refer to the figure below to understand this process more clearly:
Getting started with nginx (1) - Reverse proxy

In layman’s terms, a reverse proxy is a server responsible for forwarding requests and request results. From the perspective of the client, it is the server. But in fact it is just the entrance and exit of the service. What actually processes the request and returns the result is the server to which it distributes the request.

For example: We let Nginx listen on port 80, but the port actually used by Tomcat for business processing is 8080. Then when the client sends a request to Nginx, Nginx forwards the request to Tomcat. Tomcat processes the response business logic and returns the processing results to Nginx, and Nginx returns it to the client.

Function

  1. Protect website security and establish a barrier between the Internet and the server. Sensitive information is encrypted to prevent URL rewriting from being exposed, and it acts as a real server stand-in to prevent attacks, etc.

  2. Provides caching function to reduce the pressure on real servers and cache static files, such as CSS, JS, html, images and other static resource files.

  3. Achieve load balancing, distribute requests evenly, and balance the pressure on each server;

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces getting started with nginx (1) - reverse proxy, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template