ansible-role-mailserver/templates/mailman-domain.nginx

34 lines
841 B
Plaintext
Raw Normal View History

2020-07-24 15:43:21 +02:00
server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
{% for d in mailserver_mailman_domains %}
server_name {{ d.web }};
{% endfor %}
ssl_certificate /etc/dehydrated/certs/{{ mailserver_mailman_domains[0].web }}/fullchain.pem;
ssl_certificate_key /etc/dehydrated/certs/{{ mailserver_mailman_domains[0].web }}/privkey.pem;
root /usr/lib/mailman/cgi-bin;
location = / {
rewrite ^ /listinfo permanent;
}
location / {
fastcgi_split_path_info ^(/[^/]*)(.*)$;
fastcgi_pass unix:/run/fcgiwrap.sock;
include fastcgi.conf;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
}
location /icons {
alias /usr/lib/mailman/icons;
}
location /archives {
alias /var/lib/mailman/archives/public;
autoindex on;
}
include snippets/letsencrypt.conf;
}