Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Using Nginx reverse proxy to Tomcat multi-node

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Using Nginx reverse proxy to Tomcat multi-node

The experimental results show that the dual-computer hot backup is realized through two nginx anti-agents and keepalived, and the back-end mall project data is accessed successfully.

Required for experiment

Two nginx keepalived drift addresses 192.168.30.100

Nginx 192.168.30.34

192.168.30.36

Tomcat 192.168.30.31

192.168.30.32

Mysql 192.168.30.35

Nginx and mysql have been installed in advance

The result of the experiment is to access the mall project built by tomcat through the nginx drift address and log in, and the main server simulates downtime, thus realizing the backup machine online.

Click on the link to extract the mall file: 97f7 contains the mall structure and a database table

The following is the detailed configuration of each service

Mysql

[root@localhost] # mysql-u root-p # Log in to mysql

Mysql > create database slsaledb; # create a database named slsaledb

Mysql > GRANT all ON slsaledb.* TO 'testuser'@'%' IDENTIFIED BY' admin123'; # authorize testuser to use the password admin123

Mysql > flush privileges; # Refresh

Upload Mall database files

[root@localhost] # mysql-u root-p

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report