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 > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you nginx-1.9.7+tomcat-8.5.15 reverse proxy + application load balancer how to install configuration, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!
Environment description:
Nginx reverse proxy server ip: 10.219.24.26
Tomcat1 application server ip: 10.219.24.21
Tomcat3 application server ip: 10.219.24.23
The os environment is: linux x86x64
Reference connection: in order to save labor, give the author's previous complete connection, follow the link + the following process, you can build successfully!
Nginx-1.9.7 compilation and installation of nginx, introduction to theory: http://blog.csdn.net/zhang123456456/article/details/73228668
JDK8.0 installation of tomcat, tomcat-8.5.15 installation: http://blog.csdn.net/zhang123456456/article/details/73382524
1. After completing the installation of nginx and tomcat, follow the link specified above, and then do the following
2. Modify the configuration webapps/ROOT/index.jsp as follows
[root@mysql apache-tomcat-8.5.15] # pwd
/ usr/local/tomcat/apache-tomcat-8.5.15
[root@mysql apache-tomcat-8.5.15] # vi webapps/ROOT/index.jsp
[root@mysql apache-tomcat-8.5.15] # cat webapps/ROOT/index.jsp
This is my tomcat1
Description: similarly configure another tomcat server
3. After configuring tomcat, next, modify the nginx.conf configuration as follows
[root@mysql03 nginx] # pwd
/ usr/local/nginx
[root@mysql03 nginx] # cat conf/nginx.conf
User root root
Worker_processes 1
Events {
Worker_connections 1024
}
Http {
Include mime.types
Default_type application/octet-stream
Upstream web_app {
Server 10.219.24.21:8080 weight=1 max_fails=2 fail_timeout=30s
Server 10.219.24.23:8080 weight=1 max_fails=2 fail_timeout=30s
}
Server {
Listen 80
Server_name aa.com
Charset utf8
Location / {
Proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504
Proxy_pass http://web_app;
Proxy_redirect default
}
}
}
Note: the web_app defined by proxy_pass in the server segment must be the same as the web_app defined in upstream, otherwise the server cannot find equilibrium.
4. Start tomcat and Nginx
5. Test
These are all the contents of the article "nginx-1.9.7+tomcat-8.5.15 reverse proxy + Application load balancer how to install and configure". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to 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.