Skip to content

Instantly share code, notes, and snippets.

Created May 11, 2012 16:47
What would you like to do?
server {
listen 80;
access_log /var/log/nginx/;
error_log /var/log/nginx/ info;
location / {
include uwsgi_params;
uwsgi_pass unix://path/to/your/socket; #can also be localhost:3001 or whatever port number you use
uwsgi_param UWSGI_PYHOME /path/to/your/virtualenv;
uwsgi_param UWSGI_SCRIPT django_wsgi; #this is the name of the script
uwsgi_param UWSGI_CHDIR /path/to/your/askbot/instance;
location /m/ {
#use this for askbot <= 0.7.39
#alias /path/to/your/virtualenv/lib/python2.7/site-packages/askbot/skins/;
alias /path/to/your/askbot/instance/static/;
autoindex off;
location /upfiles/ {
alias /path/to/your/askbot/instance/askbot/upfiles/;
autoindex off;
location /admin/media {
alias /path/to/your/askbot/instance/static/admin; #or path to admin media in <= 0.7.39
autoindex off;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment