我在端口3000上运行Nginx,它运行得很好,在端口8080上运行Grafana,运行得很好。当我使用Nginx作为Grafana的反向代理时,我得到了错误的网关,下面是nginx配置和错误日志
Nginx配置文件:
server {
listen 3000 ssl;
#root /usr/share/nginx/html;
#index index.html index.htm;
ssl_certificate /etc/grafana/ELK4.crt;
ssl_certificate_key /etc/grafana/ELK4.key;
location / {
proxy_pass https://localhost:8080/;
access_log /var/log/nginx/access_grafana.log;
error_log /var/log/nginx/error_grafana.log;
}
location /api/live {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “Upgrade”;
proxy_set_header Host $http_host;
proxy_pass https://localhost:8080/;
}
}
Error.log文件:连接到上游客户端时connect()失败(111连接被拒绝)
发布于 2021-10-30 20:17:41
更改:
proxy_pass https://localhost:8080/;
至:
proxy_pass http://localhost:8080/;
https://stackoverflow.com/questions/69778780
复制相似问题