{% import "webserver/site_macros.nginx" as nginx with context -%} {{ nginx.server_definition(domainname, letsencrypt=letsencrypt) }} } {{ nginx.server_definition(domainname, True, letsencrypt=letsencrypt) }} server_name {{ domainname }}; if ( $host != '{{ domainname }}') { return 301 https://{{ domainname }}$request_uri; } client_max_body_size 1M; gzip on; gzip_types text/javascript application/javascript application/x-javascript text/css; add_header Strict-Transport-Security max-age=15552000; # 180 days location /media { alias {{ checkout }}/media; expires 10m; } location /static { alias {{ checkout }}/static; expires 6M; } location / { include uwsgi_params; uwsgi_pass unix:/run/uwsgi/app/{{ appname }}/socket; } }