Created
February 20, 2015 00:48
-
-
Save thehar/b3aadcefebd6fc02305d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
server { | |
listen 80 default deferred; | |
client_max_body_size 4G; | |
server_name graphite; | |
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