Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.