In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
If you want to record the real client access address, you need to configure it as follows:
1. Reverse proxy server nginx.conf configuration
Add three parameters after server to record IP:
Proxy_set_header Host $host
Proxy_set_header X-Real-IP $remote_addr
Proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for
Case study:
Server {
Listen 80
Server_name 10.10.32.29
Upstream tomcat {ip_hash; server 10.10.32.29:8080 max_fails=1 fail_timeout=10s weight=1; server 10.10.32.30:8080 max_fails=1 fail_timeout=10s weight=1;} location / {
Proxy_pass http://tomcat;
Proxy_redirect default
Proxy_set_header Host $host
Proxy_set_header X-Real-IP $remote_addr; # Real client ip before retaining the proxy
Proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # record the agent process
}
Error_page 500 502 503 504 / 50x.html
Location = / 50x.html {
Root html
}
}
2. Modify the configuration file of tomcat
Modify in server.xml
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.