[v9.5.x] Docs: Update run behind proxy docs (#68611)
Docs: Update run behind proxy docs (#68608)
(cherry picked from commit 5457a9ecf2)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
co-authored by
Torkel Ödegaard
parent
17f349b33d
commit
aa06e63149
@@ -106,14 +106,12 @@ server {
|
||||
index index.html index.htm;
|
||||
|
||||
location /grafana/ {
|
||||
rewrite ^/grafana/(.*) /$1 break;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_pass http://grafana;
|
||||
}
|
||||
|
||||
# Proxy Grafana Live WebSocket connections.
|
||||
location /grafana/api/live/ {
|
||||
rewrite ^/grafana/(.*) /$1 break;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
@@ -123,6 +121,12 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
If your Grafana configuration does not set `serve_from_sub_path` to true then you need to add a rewrite rule to each location block:
|
||||
|
||||
```
|
||||
rewrite ^/grafana/(.*) /$1 break;
|
||||
```
|
||||
|
||||
## Configure HAProxy
|
||||
|
||||
To configure HAProxy to serve Grafana under a _sub path_:
|
||||
|
||||
Reference in New Issue
Block a user