1
0
forked from infra/ansible
infra/roles/nginx/templates/default.j2

29 lines
502 B
Plaintext
Raw Normal View History

2021-09-30 16:00:35 +02:00
# {{ ansible_managed }}
2016-03-09 22:10:14 +01:00
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
server_name_in_redirect on;
2016-04-09 23:42:13 +02:00
location /.well-known/acme-challenge {
2016-03-09 22:10:14 +01:00
default_type "text/plain";
2016-04-09 23:42:13 +02:00
alias /var/www/acme-challenge;
2016-03-09 22:10:14 +01:00
}
location / {
return 301 https://$host$request_uri;
2020-06-18 22:39:30 +02:00
}
2016-03-09 22:10:14 +01:00
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name _;
ssl_certificate_key /etc/nginx/ssl/{{ ansible_fqdn }}.key;
ssl_certificate /etc/nginx/ssl/{{ ansible_fqdn }}.crt;
}