Django uWsgi https
server {
listen 80 default_server;
server_name ~^.*$;
charset utf-8;
client_max_body_size 128M;
location / {
uwsgi_pass unix:///tmp/app.sock;
include uwsgi_params;
}
}
server {
listen 443;
server_name ~^.*$;
charset utf-8;
client_max_body_size 128M;
ssl on;
ssl_certificate /srv/app/app.crt;
ssl_certificate_key /srv/app/app.key;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
proxy_redirect off;
uwsgi_pass unix:///tmp/app.sock;
include uwsgi_params;
}
}