35 lines
821 B
Django/Jinja
35 lines
821 B
Django/Jinja
# Generated by ansible for site {{ site_url }}
|
|
# At {{ subnet_site_ip }} on {{ subnet_cidr_address }}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name {{ site_url }};
|
|
|
|
rewrite ^ https://{{ site_url }}$request_uri permanent;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name {{ site_url }};
|
|
|
|
access_log /var/log/nginx/{{ site_name }}-access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
# Let's Encrypt
|
|
include snippets/letsencrypt.conf;
|
|
|
|
include snippets/ssl-params.conf;
|
|
ssl_certificate /etc/letsencrypt/live/{{ site_url }}/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/{{ site_url }}/privkey.pem;
|
|
|
|
include snippets/header-params_server.conf;
|
|
location / {
|
|
include snippets/header-params_location.conf;
|
|
|
|
proxy_pass http://{{ subnet_site_ip }}:80;
|
|
}
|
|
}
|
|
|
|
|