Running mailman within a domain

Patrick Ben Koetter p at state-of-mind.de
Thu Jun 14 11:18:05 UTC 2012


Hi Aleksandar,

* Aleksandar Lazic <nginx at nginx.org>:
> Hi Patrick,

we seem to meet on the same lists, do we? :)


> On 14-06-2012 00:43, Patrick Ben Koetter wrote:
> >this is my first take at nginx. I try to add /cgi-bin/mailman/... to an
> >existing server instance (mail.sys4.de). At the moment I can call scripts
> >directly e.g. <https://mail.sys4.de/cgi-bin/mailman/listinfo> works.
> >
> >What I fail to accieve is getting access to lists e.g.
> ><https://mail.sys4.de/cgi-bin/mailman/listinfo/users>. The Browser receives
> >a 403 and the fast_cgi wrapper reports:
> >
> >  Cannot chdir to script directory
> >(/usr/lib/cgi-bin/mailman/listinfo)" while reading response header from
> >upstream
> >
> >
> >What is it I am doing wrong?
> 
> I don't know too much about mailman, so I try to guess.
> 
> The
> 
> /usr/lib/cgi-bin/mailman
> 
> is the script which should be executed right?

Nope. It would be this:

/usr/lib/cgi-bin/mailman/<script>/<mailinglist>


> /listinfo
> &
> /listinfo/users
> 
> should be the path info, right?

I'd say it should be 'users' only.


> >This is my nginx configuration to include mailman into the website:
> >
> >        location /cgi-bin/mailman {
> >               root /usr/lib/;
> 
> my suggestion:
> -                fastcgi_split_path_info
> (^/cgi-bin/mailman/[^/]*)(.*)$;
> +                fastcgi_split_path_info (^/cgi-bin/mailman)/(.*)$;
> >               include /etc/nginx/fastcgi_params;
> >               fastcgi_param SCRIPT_FILENAME
> >$document_root$fastcgi_script_name;
> >               fastcgi_param PATH_INFO $fastcgi_path_info;
> >               fastcgi_param PATH_TRANSLATED
> >$document_root$fastcgi_path_info;
> >               fastcgi_intercept_errors off;
> >               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;
> >        }
> 
> output of pcretest
> 
> ###
>   re> |(^/cgi-bin/mailman)/(.*)$|
> data> /cgi-bin/mailman/listinfo
>  0: /cgi-bin/mailman/listinfo
>  1: /cgi-bin/mailman
>  2: listinfo
> data> /cgi-bin/mailman/listinfo/users
>  0: /cgi-bin/mailman/listinfo/users
>  1: /cgi-bin/mailman
>  2: listinfo/users
> ###


pcretest 
PCRE version 7.8 2008-09-05

  re> |(^/cgi-bin/mailman/[^/]*)(.*)$|
data> /cgi-bin/mailman/listinfo
 0: /cgi-bin/mailman/listinfo
 1: /cgi-bin/mailman/listinfo
 2: 
data> /cgi-bin/mailman/listinfo/users
 0: /cgi-bin/mailman/listinfo/users
 1: /cgi-bin/mailman/listinfo
 2: /users

Looks to me as if the leading / at users was wrong.


> I'am sure you have read this but I post it here as reminder ;-)
> 
> http://www.nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info

Thx. Read it now.

p@

-- 
state of mind ()

http://www.state-of-mind.de

Franziskanerstraße 15      Telefon +49 89 3090 4664
81669 München              Telefax +49 89 3090 4666

Amtsgericht München        Partnerschaftsregister PR 563



More information about the nginx mailing list