In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The requirements are as follows:
There are several servers under the domain name. Now we are testing for a certain region, so that ip users in a certain region can only access a certain server and do the test separately. If there is no problem, all of them will be updated. If there is a problem, it will have less impact, and the problem will be found and solved in time.
Solution:
Configure matching rules on the machine forwarded by the front-end load balancer using the module of nginx
In the nginx configuration vhost, add a code under the location section of the domain name.
If $remote_addr matches to ip, forward it to abc_test_server
Server {listen 80; server_name abc.com.cn; access_log / dev/null; error_log / data/logs/error.log; location / {proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for If ($remote_addr ~ "202.96.134.100") {proxy_pass http://abc_test_server; break;} proxy_pass http://abc_server;}}
Load balancing configuration also needs to be added.
# abc_test onlyupstream abc_test_server {server 192.168.20.10 abc.com.cnupstream abc_server 80;} # abc.com.cnupstream abc_server {server 192.168.20.11 abc.com.cnupstream abc_server 80; server 192.168.20.12 abc.com.cnupstream abc_server 80; server 192.168.20.13 abc.com.cnupstream abc_server 80;}
The set ip will be distributed directly to the 192.168.20.10 back-end server for testing.
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
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.