Created
August 17, 2017 16:22
-
-
Save coline-carle/8e596e8b3fca61f75c7b45482d3ef090 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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