Apache2 配置

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www

    ErrorLog ${APACHE_LOG_DIR}/error.log
    #CustomLog ${APACHE_LOG_DIR}/access.log combined
    ProxyRequests Off

    <Proxy *>
      Order deny,allow
      Allow from all
    </Proxy>

    RequestHeader edit Origin ".*" "http://10.20.xx.xxx:3000"
        ProxyPass /grafana http://10.20.xx.xx:3000
        ProxyPassReverse /grafana http://10.20.xx.xx:3000
</VirtualHost>

Grafaba 配置

http_port = 3000

# The public facing domain name used to access grafana from a browser
domain = xxx.cn

# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
enforce_domain = false

# The full public facing url
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
最后修改:2022 年 06 月 15 日 10 : 48 PM
如果觉得我的文章对你有用,无需赞赏用心感谢!