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

42 lines
891 B
Django/Jinja

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/nginx/ssl/{{ mailman_domain }}.crt;
ssl_certificate_key /etc/nginx/ssl/{{ mailman_domain }}.key;
server_name {{ mailman_domain }};
root /var/www/html/;
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location = / {
rewrite ^ /mailman3 redirect;
}
location / {
rewrite ^ /mailman3 redirect;
}
location = /listinfo {
rewrite ^ /mailman3 redirect;
}
location /mailman3/ {
include /etc/nginx/uwsgi_params;
uwsgi_pass unix:/run/mailman3-web/uwsgi.sock;
}
location /mailman3/static {
alias /var/lib/mailman3/web/static;
}
location /mailman3/static/favicon.ico {
alias /var/lib/mailman3/web/static/postorius/img/favicon.ico;
}
}