Skip to content

Instantly share code, notes, and snippets.

@bulkan
Created September 25, 2012 06:49
Show Gist options
  • Save bulkan/3780346 to your computer and use it in GitHub Desktop.
Save bulkan/3780346 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name <url>;
root /var/www/html;
location / {
access_log /var/log/nginx/development/access.log;
error_log /var/log/nginx/development/error.log;
# host and port to fastcgi server
uwsgi_pass_header Set-Cookie;
uwsgi_pass unix:///var/run/uwsgi/app.sock;
include uwsgi_params;
break;
}
location /static/ {
expires max;
access_log /var/log/nginx/development/media-access2.log;
error_log /var/log/nginx/development/media-error2.log;
alias /home/www/venv_path/development/static/;
break;
}
location /static/admin/ {
expires max;
access_log /var/log/nginx/development/media-access2.log;
error_log /var/log/nginx/development/media-error2.log;
autoindex on;
alias /home/www/venv_path/lib/python2.6/site-packages/django/contrib/admin/media/;
break;
}
}
# vi: ft=nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment