后端框架采用Springboot SpringSecurity jwt
前端JS框架采用Vue
客户要求,数据安全性,系统稳定性
用Nginx实现负债均衡,就算一台挂了,自动剔除,保证系统稳定
数据库采用实时备份,异地冗余,保证数据安全
实现
1、采用SwitchHosts 切换自定义host
127.0.0.1 www.arsmes.com
2、Nginx配置
server {
listen 80;
server_name www.arsmes.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;//前端页面的路径
index index.html index.htm;
}
location ~ ^/(user|test)/ {//代理转发至负载均衡配置
proxy_pass http://webservers;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
upstream webservers {
server 192.168.0.166:8080 weight=10;
server 192.168.0.115:9090 weight=10;
}