In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about the implementation of Nginx proxy configuration that only allows internal IP access. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it with the editor.
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.1Exallow 127.0.0.0Universe 24allow 123.56.0.0Universe 16allow 172.16.0.0On16allow 10.170.0.0According to 16deny all;}
Above is my location configuration list
Note:
1. Deny must add an ip, otherwise it will jump directly to 403 and will not be executed further. If the default page is under the same domain name, it will cause endless loop access.
2. Ip segment of allow
Rank the allowed Rank from small to large, such as 127.0.0.0Universe 24.
The following ability is: 10.170.0.0Can 16
24 indicates the subnet mask: 255.255.255.0
16 indicates the subnet mask: 255.255.0.0
8 indicates the subnet mask: 255.0.0.0
3. End of deny all;
It means that everything except the above allow is prohibited.
The above is the implementation of Nginx proxy configuration that only allows internal IP access. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.