Skip to content

Instantly share code, notes, and snippets.

@GamePlayer-8
Created July 19, 2023 07:39
Show Gist options
  • Save GamePlayer-8/8f627cfb686aef2e8129faf575c8ba22 to your computer and use it in GitHub Desktop.
Save GamePlayer-8/8f627cfb686aef2e8129faf575c8ba22 to your computer and use it in GitHub Desktop.
nginx_netdata.conf
set $netdataip <NETDATA IP>;
set $netdataport <NETDATA PORT>;
location = /netdata {
return 301 /netdata/;
}
location ~ /netdata/(?<ndpath>.*) {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header Connection "keep-alive";
proxy_store off;
proxy_pass http://$netdataip:$netdataport/$ndpath$is_args$args;
gzip on;
gzip_proxied any;
gzip_types *;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment