nginx配置:
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
location /grafana/ {
proxy_pass http://www.lvgz.cloud:3000/;
}
-------------------------------------------------------------------------------------------------------------------------------------
grafana配置
#################################### Server ####################################
[server]
# Protocol (http, https, socket)
protocol = http
# The ip address to bind to, empty will bind to all interfaces
;http_addr =
# The http port to use
http_port = 3000
# The public facing domain name used to access grafana from a browser
domain = www.lvgz.cloud
# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
enforce_domain = false
# The full public facing url you use in browser, used for redirects and emails
# If you use reverse proxy and sub path specify full url (with sub path)
#domain=localhost
#root_url = http://localhost:3000
root_url = %(protocol)s://%(domain)s/grafana/
# Log web requests
;router_logging = false