Skip to content

Instantly share code, notes, and snippets.

@gdugas
Created November 14, 2014 22:17
Show Gist options
  • Save gdugas/dad38acc16185c5f8430 to your computer and use it in GitHub Desktop.
Save gdugas/dad38acc16185c5f8430 to your computer and use it in GitHub Desktop.
upstream django {
## uwsgi launcher example: uwsgi --socket mysite.sock --module mysite.wsgi --chmod-socket=666
server unix:///path/to/mysite.sock;
}
server {
listen 8080 default_server;
server_name localhost;
charset utf-8;
location /media {
alias /path/to/media;
}
location /static {
alias /path/to/static;
}
location / {
uwsgi_pass django;
include /path/to/uwsgi_params;
}
ssl on;
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
ssl_prefer_server_ciphers on;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment