forked from infra/ansible
28 lines
470 B
Django/Jinja
28 lines
470 B
Django/Jinja
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;
|
|
|
|
server_name {{ mc_domain }};
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/{{ mc_domain }}.key;
|
|
ssl_certificate /etc/nginx/ssl/{{ mc_domain }}.crt;
|
|
|
|
root /var/www/mc;
|
|
}
|