Mailman web interface on nginx

Hello,

Does someone run mailman web interface under nginx? Of course, without
using another web server such as thttpd.

The biggest problem seems to be mailman urls are of the type:
http://mailman.example.com/admin/mylist
So the program to be run is admin with the “parameter” /mylist, while
classic cgi config will try to run program mylist which does not exist.

Any help appreciated.

Best Regards

On Wed, Apr 02, 2008 at 04:18:07PM +0200, Renaud Allard wrote:

Does someone run mailman web interface under nginx? Of course, without
using another web server such as thttpd.

The biggest problem seems to be mailman urls are of the type:
http://mailman.example.com/admin/mylist
So the program to be run is admin with the “parameter” /mylist, while
classic cgi config will try to run program mylist which does not exist.

Hi!

I haven’t used the mailman web interface but if it uses CGI, I’ll
shamelessly plug my fcgiwrap :slight_smile: You can get it from here:

http://git.localdomain.pl/?p=fcgiwrap.git;a=summary

(though I’ll probably move/copy it to github One Day™).

After you compile it (requires libfcgi headers), start it via spawn-fcgi
or something similar. Set fastcgi_param DOCUMENT_ROOT $document_root in
your nginx config and fastcgi_pass for the URLs you wish, e.g. (not
tested):

server {
listen 127.0.0.1:80;
server_name mailman.example.com;
root /var/www/mailman;

fastcgi_param DOCUMENT_ROOT $document_root;
location /admin {
fastcgi_pass unix:/var/run/fastcgi/fcgiwrap.sock;
}
}

The $document_root/admin file should be an executable CGI script,
otherwise fcgiwrap throws a 403. fcgiwrap is smart enough to notice
where the script name ends and where the PATH_INFO begins.

NOTE 1: do not run fcgiwrap under any kind of elevated privileges.
It’s a stupid app which doesn’t drop permission etc.

NOTE 2: currently it only serves one request at a time (no
multiplexing), though you may simply start several instances (it’s
pretty lightweight)

NOTE 3: not everything from the CGI spec is implemented but I’m slowly
getting there (particularly Location: /relative/uri is broken but hardly
anything cares, I think).

NOTE 4: nothing is done to the path_info part so you may run into issues
with special characters (e.g. %40 instead of @).

Shoot me an email if you run into any problems.

Best regards,
Grzegorz N.