Skip to content

Instantly share code, notes, and snippets.

@rod-dot-codes
Created June 8, 2013 18:30
Show Gist options
  • Save rod-dot-codes/5736132 to your computer and use it in GitHub Desktop.
Save rod-dot-codes/5736132 to your computer and use it in GitHub Desktop.
A template for Nginx Django connecting to uWSGI
server {
listen {{ports}};
{% if ssl_secure %}
include ssl_secure;
{% endif %}
server_name {{url}};
client_max_body_size 5G;
access_log /var/log/nginx/{{url}}{{ports}}.access;
error_log /var/log/nginx/{{url}}{{ports}}.errors;
{% for static in static_locations %}
location {{static.location}}
{
alias {{static.file_system_location}};
}
{% endfor %}
{% for uwsgi in uwsgi_servers %}
location {{uwsgi.location}}
{
include uwsgi_params;
uwsgi_pass {{uwsgi.server}};
}
{% endfor %}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment