Had to upgrade an old mailman server to Ubuntu Precise and decided to use nginx with fastcgi.

After looking around at various howto's and tutorial sites, tried a few with poor results. The closest to working behavior was mailman listinfo and admin pages loading but nothing beyond those.

Turns out the fcgiwrap program has an old feature to work around some initial shortcomings in nginx. Then nginx implemented fastcgi_split_path_info to address the need. Since version 1.0.2 fcgiwrap has both it's old behavior and a mechanism to use nginx's solution available.

Here is the relevant snippet from the fcgiwrap man page:

  To  disable  PATH_INFO mangling, set up your web server 
  to pass SCRIPT_FILENAME, which should contain the complete 
  path to the script. Then PATH_INFO will not be modified.

After reviewing the regexes being bandied about and the docs on fastcgi_split_path_info and fcgiwrap handling of PATH_INFO and setting the mailman base directory, here is a working nginx config section:

  root /usr/lib/cgi-bin;

  location / {
    rewrite ^ /mailman/listinfo permanent;

  location /mailman {
    fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass  unix:/var/run/fcgiwrap.socket;

This handles requests to http://server.your.domain/mailman. This also avoids setting /usr/lib as the web server document root as in the howtoforge tutorial.

For Ubuntu the mailman base directory was changed in /etc/mailman/mm_cfg.py:

  DEFAULT_URL_PATTERN = 'https://%s/mailman/'

Hope someone finds this helpful alongside the other noise on this issue.