Created
October 12, 2013 20:33
-
-
Save drscream/6954635 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
user www www; | |
worker_processes 1; | |
events { | |
# After increasing this value You probably should increase limit | |
# of file descriptors (for example in start_precmd in startup script) | |
worker_connections 1024; | |
} | |
http { | |
include /opt/local/etc/nginx/mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
upstream app_server { | |
#server unix:/tmp/gunicorn.sock fail_timeout=0; | |
# For a TCP configuration: | |
server 127.0.0.1:8080 fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name _; | |
client_max_body_size 64M; | |
keepalive_timeout 5; | |
# path for static files | |
root /opt/graphite/webapp/content; | |
location /media/ { | |
# this changes depending on your python version | |
root /opt/local/lib/python2.7/site-packages/django/contrib/admin; | |
} | |
location / { | |
proxy_pass_header Server; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Scheme $scheme; | |
proxy_connect_timeout 10; | |
proxy_read_timeout 10; | |
proxy_pass http://app_server; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment