mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-25 19:17:09 +03:00
Updated Reverse proxy to the Glances Web UI (markdown)
parent
ee57bf7cec
commit
05e9bf71ad
@ -26,20 +26,19 @@
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
or:
|
||||
|
||||
`location /glances/ {`
|
||||
`rewrite /glances/(.*) / break;`
|
||||
`proxy_pass http://localhost:61208;`
|
||||
`proxy_set_header Host $host;`
|
||||
`proxy_set_header X-Real-IP $remote_addr;`
|
||||
`proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;`
|
||||
`proxy_set_header X-Forwarded-Proto $scheme; #doesn't do anything?`
|
||||
`}`
|
||||
|
||||
`location / {`
|
||||
`if ($http_referer ~ "^https?://[^/]+/glances"){`
|
||||
`rewrite ^/(.*) https://$http_host/glances/ redirect;`
|
||||
`}`
|
||||
`}`
|
||||
or (thanks to @gavinws in https://github.com/nicolargo/glances/issues/876):
|
||||
|
||||
location /glances/ {
|
||||
rewrite /glances/(.*) /$1 break;
|
||||
proxy_pass http://localhost:61208;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme; #doesn't do anything?
|
||||
}
|
||||
|
||||
location / {
|
||||
if ($http_referer ~ "^https?://[^/]+/glances"){
|
||||
rewrite ^/(.*) https://$http_host/glances/$1 redirect;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user