location / { index index.jsp; proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; deny 192.168.1.1; allow 127.0.0.0/24; allow 123.56.0.0/16; allow 172.16.0.0/16; allow 10.170.0.0/16; deny all; } The above is my location configuration list Note: 1. You must add an IP address when denying , otherwise it will jump directly to 403 without further execution; if the 403 default page is under the same domain name, it will cause an infinite loop of access; 2. Allowed IP segments Arrange from the smallest to the largest segment allowed to be accessed, such as: 127.0.0.0/24 The following can be: 10.170.0.0/16 24 represents the subnet mask: 255.255.255.0 16 represents the subnet mask: 255.255.0.0 8 represents the subnet mask: 255.0.0.0 3. deny all; ending Indicates that all other parameters except the above allow are prohibited The above is all the knowledge points introduced this time. Thank you for your learning and support for 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of rpm installation in mysql
>>: Detailed explanation of the execution process of JavaScript engine V8
1. Download the software 1. Go to the MySQL offic...
[Who is nslookup?] 】 The nslookup command is a ve...
I have a product parts table like this: part part...
This article is from the Apache Spark Meetup held...
Generally speaking, when we view the contents of ...
Preface When a Linux is fully set up, you can use...
Preface JSON is a lightweight data exchange forma...
This article example shares the specific code of ...
Table of contents Preface Create a Vite project R...
CSS controls the printing style of web pages : Use...
Introduction to Nginx dynamic and static separati...
Hash Join Hash Join does not require any indexes ...
!DOCTYPE Specifies the Document Type Definition (...
The difference between replace into and insert in...
It is very easy to delete a table in MySQL, but y...