Let's first understand a wave of concepts, what is nginx reverse proxy? Reverse proxy means using a proxy server (here nginx) to receive requests on the network, that is, URL (the default is port 80). 1. Nginx makes some judgments on the URL (the forwarding rules are configured in the nginx configuration file), such as the port number (the default value of nginx is 80), which may be the secondary domain name. For example, test1.baidu.com and test2.baidu.com are two second-level domain names. The first-level domain name here is baidu.com. DNS will resolve these two domain names to the same IP ( you need to add second-level domain name resolution (Alibaba Cloud needs to add resolution in domain name resolution. Different domain names can be resolved to the server with the same IP), or they can be resolved to different IPs separately ) 2. After nginx is configured as a reverse proxy, it can forward requests for different secondary domain names to different ports or IPs and ports that can provide corresponding services. That is to say, you enter test1.baidu.com in your browser test2.baidu.com and press Enter. The actual access port (or IP, which depends on the configuration of the forwarding rules in your nginx) is different, and the service obtained is also different (this is the project in the nginx configuration file that forwards requests to different IPs and ports according to different domain names or request paths); Let's take a screenshot online: client: It is the client browser, which can be a mobile browser or a PC browser That blue cloud is the Internet Reverse proxy server: server configured with nginx Web server, file server --- Tomcat or other containers (with web projects deployed) that provide services. These servers are usually in the same LAN. To put it simply, the external network accesses the same port (80), which is forwarded to different ports on the internal network that provide different services through nginx. Does this mean that we only need to open port 80 and can close port 8080? I went to Alibaba Cloud to test it: After shutting down 8080, Modify the default.conf file of nginx After wq saves the changes, start nginx: service nginx restart That's it. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: RHEL7.5 mysql 8.0.11 installation tutorial
>>: Summary of how to use bootstrap Table
Table of contents Method 1: Routing meta informat...
MongoDB is cross-platform and can be installed on...
Non-orthogonal margins When margin is used, it wi...
1. Unzip the file to the current directory Comman...
Table of contents How to start mysqld Method 1: m...
1. System environment [root@localhost home]# cat ...
Table of contents 1. Problematic SQL statements S...
1. Download mysql-8.0.17-winx64 from the official...
I struggled with a problem for a long time and re...
Solution 1 Completely uninstall and delete all da...
The implementation method is divided into three s...
This article example shares the specific code of ...
Problem description: Recently, there is a demand ...
Currently, almost all large websites and applicat...
Table of contents Basic application of javascript...