ansible/roles/web_mc/templates/vhost.j2

28 lines
470 B
Plaintext
Raw Normal View History

2020-12-24 12:38:42 +01:00
server {
listen 80;
listen [::]:80;
server_name {{ mc_domain }};
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location / {
return 301 https://{{ mc_domain }}$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
2020-12-24 13:05:44 +01:00
server_name {{ mc_domain }};
2020-12-24 12:38:42 +01:00
ssl_certificate_key /etc/nginx/ssl/{{ mc_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ mc_domain }}.crt;
root /var/www/mc;
}