Skip to content

Instantly share code, notes, and snippets.

@fitoria
Created May 11, 2012 16:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitoria/427eace448b71461755c to your computer and use it in GitHub Desktop.
Save fitoria/427eace448b71461755c to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name domain.com;
access_log /var/log/nginx/domain.com.access.log;
error_log /var/log/nginx/domain.com.error.log 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