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/