In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Demand background:
The path to directly access the Tomcat project is as follows:
Http://10.8.1.5:8080/erp
It is required that www.erp.com access can be accessed to http://10.8.1.5:8080/erp
Requirements Analysis:
You cannot use a simple reverse proxy here, because the backend server has a directory (erp), and in order to access the friendly www.erp.com backend, you cannot add a directory, so you cannot simply use nginx to match the backend server according to the directory. The final result nginx configuration is as follows:
Server {listen 80; server_name www.erp.com; location / {rewrite ^ / (. *) $http://www.erp.com/erp/$1 permanent;} location / erp {proxy_pass http://10.8.1.5:8080/erp; proxy_next_upstream http_500 http_502 http_503 error timeout invalid_header; proxy_set_header Host $host Proxy_set_header X-Forwarded-For $remote_addr;} access_log / var/log/nginx/erp.log main;}
The above configuration only replaces one server. If there are multiple servers, you can use upstream module to solve the problem.
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.