In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Demand scenarios:
There are data centers An and B. Only servers in data center B can access www.b.com. Today, there is a server A2 in data center A that also needs to access www.b.com.
There is a Nginx server A1 with a public network IP in data center A. In data center B, there is a Nginx server B1 in the intranet, which accesses the Internet through a router.
Second, ideas:
Xxx or proxy can be used, but for this requirement, it is easier to use Nginx's reverse proxy feature.
Third, practice:
1. Add the resolution of "the domain name to be accessed to the IP of A1" in the hosts file of A2.
172.22.0.4 www.b.com
2. Map port 8001 of B1 through the router in data center B.
3. Add parsing to the hosts file of A1.
10.0.2.2 tz.b.com
4. Configure the reverse proxy in A1. The jump address is the address of the Nginx of data center B.
Server {listen 80; server_name www.b.com; location / {proxy_pass http://tz.b.com:8001;}}
5. Configure the reverse proxy in B1. The jump address is the domain name that needs to be accessed.
Server {listen 8001; server_name tz.b.com; location / {proxy_pass http://www.b.com;}}
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.