Loading

nginx conf for mailman

  1. server {
  2.     listen *:80;
  3.     server_name _;
  4.     root /usr/lib/cgi-bin/;
  5.  
  6.     location /mailman {
  7.       fastcgi_split_path_info (/mailman/[^/]*)(.*)$;
  8.       fastcgi_pass unix:/var/run/fcgiwrap.sock;
  9.       include fastcgi.conf;
  10.       fastcgi_param PATH_INFO         $fastcgi_path_info;
  11.       fastcgi_param PATH_TRANSLATED   $document_root$fastcgi_path_info;
  12.     }
  13.  
  14.     # catch old 'cgi-bin' links
  15.     location /cgi-bin {
  16.       rewrite ^/cgi-bin(.*)$ $1 permanent;
  17.     }
  18.  
  19.     location /images/mailman {
  20.       alias /usr/share/images/mailman;
  21.     }
  22.  
  23.     # Expose archives (regex can't be used due to / fcgi location)
  24.     location /archives {
  25.       alias /var/lib/mailman/archives/public;
  26.       autoindex on;
  27.     }
  28.     location /pipermail {
  29.       alias /var/lib/mailman/archives/public;
  30.       autoindex on;
  31.     }
  32.  
  33. }