【发布时间】:2019-11-27 10:15:19
【问题描述】:
我已将 Nginx 配置为负载平衡安装在 centos 中的 opentsdb 客户端。配置如下所示
events {}
http {
upstream opentsdblb {
least_conn;
server 10.42.34.11:4242;
server 10.42.34.12:4242;
}
server {
listen 80;
location / {
proxy_pass http://opentsdblb/;
}
}
}
点击 URL 时,我得到一个错误的网关。我在这里遗漏了什么吗?
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.16.1</center>
</body>
</html>
注意:Nginx 安装在 10.42.34.12
【问题讨论】: