: This article mainly introduces the differences between nginx Reverse proxy and forward proxy. For more information about PHP tutorials, see. I have always had no idea how to understand the reverse direction of the reflection proxy. after Baidu knows it, I finally figured out a little bit by combining the following figure. To put it simply, the forward direction is from a LAN to the server, and the reverse direction is from the client to a LAN.
Concept:
The Reverse Proxy method is to use a Proxy server to accept connection requests from the internet, and then forward the requests to the server on the internal network, return the result obtained from the server to the client requesting connection from the internet. the proxy server is displayed as a server.
Overview:
Generally, the proxy server is only used to proxy internal network connection requests to the Internet. the client must specify the proxy server and send the http requests that were originally sent directly to the Web server to the proxy server. Because hosts on the external network do not configure and use this proxy server, the common proxy server is also designed to search for multiple uncertain servers on the Internet, instead of accessing a fixed server for requests from multiple clients on the Internet, the common Web proxy server does not support external access requests to the internal network. When a proxy server can proxy hosts on the external network and access the internal network, this proxy service is called reverse proxy service. In this case, the proxy server acts as a Web server, and the external network can simply treat it as a standard Web server without specific configuration. The difference is that this server does not store the real data of any Web pages, and all static Web pages or CGI programs are stored on internal Web servers. Therefore, the attack on the reverse proxy server does not damage the webpage information, which enhances the security of the Web server.
There is no conflict between the reverse proxy mode and the packet filtering mode or the normal proxy mode. Therefore, you can use both methods in the firewall device. the reverse proxy is used when the external network accesses the internal network, forward proxy or packet filtering is used to deny other external access methods and provide internal network access to external networks. Therefore, we can combine these methods to provide the best security access method.
Why is reverse:
However, this does not explain why it is called reverse, in principle. the proxy server processes requests from the client and forwards the requests to the target server. Therefore, the proxy server does not work in reverse order, the following figure shows why reverse proxy is called reverse proxy:
By the way, in terms of structure, the two sides of the forward proxy and reverse proxy are changed. the client of the original proxy server comes from the intranet. it and the proxy server form a LAN, and after the reverse proxy. the proxy server and the server form a group. so from the perspective of structure, it is a reverse. from the English perspective, the word "reverse" contains the flip meaning, which means the reverse on the structure diagram, but due to the translation relationship. in Chinese, it becomes a reverse proxy. in fact, proxy has not done anything different from before. it still forwards requests from the client to the actual client ., today, due to the extensive use of CDN, the servers behind reverse proxy use actual IP addresses to adapt to this cross-network architecture. in this way, it is more difficult for everyone to have a clear answer to the question "What does reverse proxy actually mean.
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above introduces the differences between nginx Reverse proxy and forward proxy, including the content, hope to be helpful to friends who are interested in PHP tutorials.