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
The usage format of the mysqladmin tool is: mysql...
When you feel that there is a problem with MySQL ...
[LeetCode] 183.Customers Who Never Order Suppose ...
Since the standard ab only supports stress testin...
As shown below: nsenter -t 1 -m -u -n -i sh -c &q...
Preface Sometimes when we view database data, we ...
Arrange by functionNN : Indicates which earlier ve...
Table of contents introduce Installation and Usag...
Install Enter the following command to install it...
This question originated from a message on Nugget...
Table of contents 1. Problematic SQL statements S...
Table of contents 1. Solution 2. MySQL character ...
Table of contents vite function Use Environment B...
animation-name animation name, can have multiple ...
Original article, please indicate the author and ...