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

27 lines
479 B
Plaintext
Raw Normal View History

2016-03-09 22:10:14 +01:00
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
server_name_in_redirect on;
location '/.well-known/acme-challenge' {
default_type "text/plain";
root /tmp/letsencrypt-auto;
}
location / {
return 301 https://$host$request_uri;
}
}
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;
}