Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use apache proxy tomcat cluster and implement session replication

Shulou Source: shulou.com Published: 2022-06-02 22:59:43 09月22日 Update

1. System structure diagram

two。 Prepare for

Host tomcatA: shutting down iptables

Host tomcatB: shutting down iptables

Host apache: close iptables, close selinux

3. Install softwar

To install tomcat, please refer to: http://blog.csdn.net/kairui123/article/details/71247618

Install apache:yum install httpd

4. Configure appche

ProxyRequests off / / whether to enable forward agent SetHandler balancer-manager ServerAdmin www.creazyrui.com DocumentRoot / var/www/html ServerName www.creazyrui.com

Parameter explanation:

Loadfactor: specify weight

Route: specify host

5. Configure tomcat

At the end, the Welcome to tomcat welcome to tomcat / / element tells tomcat that the distributed reference / / will configure all the above files and modify the jvmRoute= to all the tomcat servers in the cluster.

6. Add pages and test

Tags: Management file cluster host configuration parameters server node service test content single location label status result path synchronization run agent Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Huawei Redmi Shulou Technology Shulou Information