-
-
Save neurosnap/11390064 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
upstream eaa_app_server { | |
server unix:/srv/www/eaa/run/gunicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name eaa.neurosnap.net; | |
client_max_body_size 4G; | |
access_log /srv/www/logs/eaa/nginx-access.log; | |
error_log /srv/www/logs/eaa/nginx-error.log; | |
location /static/ { | |
alias /srv/www/eaa/eaa/static/; | |
} | |
location /media/ { | |
alias /srv/www/eaa/media/; | |
} | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
if (!-f $request_filename) { | |
proxy_pass http://eaa_app_server; | |
break; | |
} | |
} | |
error_page 500 502 503 504 /500.html; | |
location = /500.html { | |
root /srv/www/eaa/eaa/static/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment