forked from infra/ansible
Fix mailman vhost.
This commit is contained in:
parent
e711819e2f
commit
3eafb60eba
@ -61,7 +61,7 @@
|
||||
tags: mail
|
||||
|
||||
- name: Configure mailman vhost
|
||||
template: src=mailman/vhost.j2 dest=/etc/nginx/sites-available/mailman
|
||||
template: src=nginx/vhost.j2 dest=/etc/nginx/sites-available/mailman
|
||||
notify: Restart nginx
|
||||
tags: mail
|
||||
|
||||
|
@ -1,22 +1,14 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ mailman_domain }};
|
||||
root /usr/lib/;
|
||||
root /usr/lib/cgi-bin/mailman/;
|
||||
|
||||
location = / {
|
||||
rewrite ^ /mailman/listinfo permanent;
|
||||
rewrite ^ /listinfo permanent;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite ^ /mailman$uri?$args;
|
||||
}
|
||||
|
||||
location = /mailman/ {
|
||||
rewrite ^ /mailman/listinfo permanent;
|
||||
}
|
||||
|
||||
location /mailman {
|
||||
fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
|
||||
fastcgi_split_path_info (^/[^/]*)(.*)$;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
@ -24,9 +16,11 @@ server {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user