Last active
February 26, 2016 14:00
-
-
Save renatoassis01/204fc287a9513755ad28 to your computer and use it in GitHub Desktop.
Ngnix template virtual host Python applications
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
server { | |
listen 80; | |
server_name app.com.br; | |
client_max_body_size 20M; | |
location / { | |
uwsgi_param Host $host; | |
uwsgi_param X-Real-IP $remote_addr; | |
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for; | |
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto; | |
uwsgi_pass 127.0.0.1:9000; | |
uwsgi_read_timeout 3600; | |
include uwsgi_params; | |
} | |
location /static/ { | |
alias /webapps/www/app/assets/; | |
} | |
location /media/ { | |
alias /webapps/www/app/media/; | |
} | |
error_page 500 502 503 504 /500.html; | |
location = /500.html { | |
root /webapps/www/app/error_pages/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment