Jan Dittberner
2833b78c8a
- setup listener and pg_hba.conf for PostgreSQL server - add state code for gva - add macros for nginx and uwsgi with Python 3 support - add pillar data for gva
32 lines
786 B
Nginx Configuration File
32 lines
786 B
Nginx Configuration File
{% 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;
|
|
}
|
|
}
|