Skip to content

Instantly share code, notes, and snippets.

@coline-carle
Created August 17, 2017 16:22
Show Gist options
  • Save coline-carle/8e596e8b3fca61f75c7b45482d3ef090 to your computer and use it in GitHub Desktop.
Save coline-carle/8e596e8b3fca61f75c7b45482d3ef090 to your computer and use it in GitHub Desktop.
upstream netdata {
server localhost:19999;
}
server {
listen 80;
server_name {{ domain }};
access_log /var/log/nginx/netdata_access.log combined;
error_log /var/log/nginx/netdata_error.log warn;
location / {
allow all;
# Proxy Headers
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Cluster-Client-Ip $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
# The Important Websocket Bits!
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://netdata;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment