Skip to content

Instantly share code, notes, and snippets.

@vindia
Created May 1, 2012 09:06
Show Gist options
  • Save vindia/2566612 to your computer and use it in GitHub Desktop.
Save vindia/2566612 to your computer and use it in GitHub Desktop.
Nginx site configuration for Graphite
server {
listen 80 default deferred;
client_max_body_size 4G;
server_name stats.springest.net;
keepalive_timeout 5;
# path for static files
root /opt/graphite/webapp/content;
index index.html;
location / {
# checks for static file, if not found proxy to app
try_files $uri @proxy_to_app ;
}
location @proxy_to_app {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://localhost:8000;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /opt/graphite/webapp/content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment