Do you know howto setup mailman+nginx+fcgiwrap+ubuntu/debian?, was: Bug in NginxHttpFcgiModule's fastcgi_split_path_info

Francis Daly francis at daoine.org
Fri Nov 12 19:03:00 MSK 2010


On Thu, Nov 11, 2010 at 06:12:31PM +0000, Mark Alan wrote:
> On Thu, 11 Nov 2010 05:35:46 +0300,francis at daoine.org wrote:

Hi there,

> I thank you for your attempt at trying to help me.

You're welcome.

We can keep trying, if you're happy to.

> Well, the truth is that Mailman works out of the box using Apache on
> Ubuntu/Debian Linux, using a config file
> named /etc/mailman/apache.conf, which includes these lines:
>   ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/
>   Alias /pipermail/ /var/lib/mailman/archives/public/
>   Alias /images/mailman/ /usr/share/images/mailman/

As far as I can see, the debian configuration is not the same as the
mailman-default configuration. So if you change the urls handled by the
web server, you must also change the urls generated by mailman.

In the previous mail, it looks like the mailman and web server
configurations were not synchronised.

> I have tried many changes to both my nginx config file and to mailman's
> mm_cfg.py.

It looks like it would be best to decide what config you want, and then
work to that. The wiki page you referenced, http://wiki.nginx.org/Mailman,
suggests to install from packages, and then configure according to the
mailman web site. And then suggests an nginx configuration based on that
mailman configuration, not the original configuration. I think.

At each stage, make one change for one reason, and see that it works
as expected.

(I think it's a slight shame that the wiki page doesn't specify what
versions of software were used in that recipe; and there also seem to
be enough missing parts that it's not really a recipe at all. "Configure
mailman", "add some cgi processor". But this is a good chance for someone
who wants to set it up, to note exactly what they did, so that the *next*
person with the same problem has a harder-to-misunderstand recipe.)

For example:

> And, for instance, it almost does the job by just using:
> 	root /usr/lib/cgi-bin/mailman/;
> 	location = / {
> 		rewrite ^ /listinfo last;
> 	}
> 	location /cgi-bin/mailman/ {
> 		rewrite ^ /$args;
> 	}

there, I'm not sure what urls you are expecting to have work. Ones that
start with "/mailman", or "/cgi-bin/mailman", or "/cgi-bin", or all of
the above. mm_cfg.py matters here too.

> But there are administrative areas that still do not work.

When you next have a looks-like-it-should-work configuration, and you see
some oddities like this, please include the request made, the expected
result, and the actual result -- that should make it easier for someone
to see what is happening.

> After an extensive search in the web, it seems that this same problem
> surfaces from time to time and those who ask for help, either stop
> using Nginx to serve Mailman, or just abandon the thread were they
> asked for help in the first place.
> 
> It must be possible, as Nginx's own mailing lists are
> managed by Mailman (although under FreeBSD).

I don't see any mention of "fastcgi" or "fcgi" or "fcgiwrap" when
searching on the mailman wiki, http://wiki.lists.org/. Maybe mailman
doesn't work under fastcgi at all? From the http://wiki.nginx.org/Mailman
page, it presumably did work for whoever wrote it.

> But, as of Nov.2011, I have not found a single site with clear
> instructions on howto setup a fully working Mailman using Ubuntu/Debian
> + Nginx + fcgiwrap (or any other cgi wrapper).

As per Igor's mail, there was a thread here a few weeks ago where
someone was trying to proxy the cgi stuff to a cgi-enabled web server,
and the configuration used by the nginx server. I didn't see a follow-up
saying either "that works for me", or "still broken, here's what I do,
what I see, and what I expect to see, please help more"

> >...remove the string "/cgi-bin" from two lines up there. 
> 
> Done that too, but also without success.

That looks to me like the most likely to succeed.

nginx.conf exactly as it was sent the last time, and the 8 characters
"/cgi-bin" removed from two config lines in mm_cfg.py. What requests
do you make, and what responses do you see? ("curl -i" or "curl -v"
can be very handy in finding out exactly what is going on, as can the
nginx debug log.)

> > Your nginx is not configured to serve from the /cgi-bin urls, but is
> > from the others.
> 
> I agree, but having spent more than a few hours running in circles, I do
> not know what else to change.

I know it can get frustrating running in circles.

If Igor's "proxy cgi, don't try to force it to be fastcgi" configuration
isn't one you want to try, then I suggest to go back to the state when
you sent the first mail, and adjust mm_cfg.py.

Note: there is a recent mailman thread, ending at
http://www.mail-archive.com/mailman-users@python.org/msg57853.html,
which suggests that the mailman stuff was failing because the fastcgi
system in that setup was not defining PATH_INFO correctly.

After you've expunged the /cgi-bin urls, you may be able to see whether
that problem affects your fastcgi setup (I don't see explicit version
numbers in that mailman thread).

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list