Skip to content

Instantly share code, notes, and snippets.

@tioan
Created January 29, 2017 12:58
Show Gist options
  • Save tioan/a58dca8fbac5f31a2e521c8e7b93fd31 to your computer and use it in GitHub Desktop.
Save tioan/a58dca8fbac5f31a2e521c8e7b93fd31 to your computer and use it in GitHub Desktop.
root@warehouse:/etc/nginx/sites-enabled# cat netdata
upstream backend {
# the netdata server
server 127.0.0.1:19999;
keepalive 64;
}
server {
# nginx listens to this
listen 80;
# the virtual host name of this
server_name netdata.warehouse.bubble-wrap.it;
location / {
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_pass http://backend;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header Connection "keep-alive";
proxy_store off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment