nginx反向代理grafana+prometheus

1.nginx配置文件nginx

location /prometheus{ proxy_pass http://localhost:9090;
 } location /grafana { rewrite ^/grafana/(.*) /$1 break; proxy_pass http://localhost:3000;
 proxy_set_header Host $host; }

2.修改grafana配置文件vim

vim /etc/grafana/grafama.ini [server] # Protocol (http, https, h2, socket) ;protocol = http root_url: http://localhost:3000/grafana/
3.重啓nginx、grafana
4.訪問nginx http://ip:80/grafana
相關文章
相關標籤/搜索