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
Table of contents Development Environment Game en...
1. Warm and gentle Related address: http://www.web...
This article shares the specific code of Vue to s...
How to uninstall MySQL database under Linux? The ...
Nginx can use its reverse proxy function to imple...
background Search the keyword .htaccess cache in ...
Some of you may have heard that the order of trav...
Classification of website experience 1. Sensory e...
As more and more projects are deployed, more and ...
Table of contents Implementation effect diagram I...
Examples: Through the PHP background code, you ca...
Recently, I have a need to list all host names in...
Table of contents Small but beautiful Keep it sim...
MySQL paging analysis principle and efficiency im...
/******************** * Virtual File System VFS *...