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

35 lines
774 B
Django/Jinja

server {
listen 80;
server_name {{ mailman_domain }};
root /usr/lib/;
location = / {
rewrite ^ /mailman/listinfo permanent;
}
location / {
rewrite ^ /mailman$uri?$args;
}
location = /mailman/ {
rewrite ^ /mailman/listinfo permanent;
}
location /mailman {
fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
location /images/mailman {
alias /usr/share/images/mailman;
}
location /pipermail {
alias /var/lib/mailman/archives/public;
autoindex on;
}
}