Nginx实现负载均衡
docker创建三个容器,三个服务端口分别为224,1224,1225:
修改Nginx配置文件,添加反向代理upstream,实现负载均衡:
upstream zhieasy{
server 127.0.0.1:224;
server 127.0.0.1:1224;
server 127.0.0.1:1225;
}
server
{
listen 80;
listen 443 ssl http2;
server_name api.zhiyit
原创
2022-01-07 15:53:07 ·
1347 阅读 ·
0 评论