Skip to content

Instantly share code, notes, and snippets.

@edavis
Created July 25, 2011 00:54
Show Gist options
  • Save edavis/1103323 to your computer and use it in GitHub Desktop.
Save edavis/1103323 to your computer and use it in GitHub Desktop.
django + uwsgi deploy config
# nginx config
server {
server_name transparentnevada.com www.transparentnevada.com;
client_max_body_size 30m;
location /favicon.ico {
alias /srv/django-media/transparentnevada-production/images/favicon.ico;
}
location /static/ {
alias /srv/django-media/transparentnevada-production/;
autoindex on;
}
location / {
uwsgi_pass unix:/srv/sockets/transparentnevada-production.sock;
include uwsgi_params;
}
}
[uwsgi]
socket = /srv/sockets/transparentnevada-production.sock
env = DJANGO_SETTINGS_MODULE=settings
virtualenv = /srv/environments/transparentnevada-production/
module = django.core.handlers.wsgi:WSGIHandler()
pythonpath = /srv/projects/transparentnevada-production/
pythonpath = /srv/projects/transparentnevada-production/apps/
# to run: uwsgi --ini <path to transparentnevada.ini>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment