Welcome! Log In Create A New Profile

Advanced

Re: Running mailman within a domain

Aleksandar Lazic
June 14, 2012 04:54AM
Hi Patrick,

On 14-06-2012 00:43, Patrick Ben Koetter wrote:
> Greetings,
>
> 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?

The

/listinfo
&
/listinfo/users

should be the path info, right?

> 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
###

> /etc/nginx/fastcgi_params contains these settings:

[snipp]

> My error log gives this output:

[snipp]

> 2012/06/14 00:39:48 [debug] 27873#0: *13 http uri:
> "/cgi-bin/mailman/listinfo/users"

[snipp]

> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "SCRIPT_FILENAME"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var:
> "/usr/lib/cgi-bin/mailman/listinfo/users"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param:
> "SCRIPT_FILENAME: /usr/lib/cgi-bin/mailman/listinfo/users"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "SCRIPT_NAME"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var:
> "/cgi-bin/mailman/listinfo"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "SCRIPT_NAME:
> /cgi-bin/mailman/listinfo"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "REQUEST_URI"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var:
> "/cgi-bin/mailman/listinfo/users"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "REQUEST_URI:
> /cgi-bin/mailman/listinfo/users"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "DOCUMENT_URI"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var:
> "/cgi-bin/mailman/listinfo/users"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param:
> "DOCUMENT_URI: /cgi-bin/mailman/listinfo/users"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "DOCUMENT_ROOT"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var: "/usr/lib"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param:
> "DOCUMENT_ROOT: /usr/lib"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "SERVER_PROTOCOL"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var: "HTTP/1.1"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param:
> "SERVER_PROTOCOL: HTTP/1.1"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "GATEWAY_INTERFACE"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy: "CGI/1.1"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param:
> "GATEWAY_INTERFACE: CGI/1.1"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "SERVER_SOFTWARE"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy: "nginx/"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var: "1.1.19"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param:
> "SERVER_SOFTWARE: nginx/1.1.19"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "REMOTE_ADDR"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var:
> "178.27.33.0"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "REMOTE_ADDR:
> 178.27.33.0"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "REMOTE_PORT"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var: "35670"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "REMOTE_PORT:
> 35670"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "SERVER_ADDR"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var:
> "194.126.158.57"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "SERVER_ADDR:
> 194.126.158.57"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "SERVER_PORT"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var: "443"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "SERVER_PORT:
> 443"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "SERVER_NAME"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var:
> "mail.sys4.de"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "SERVER_NAME:
> mail.sys4.de"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy: "HTTPS"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var: "on"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "HTTPS: on"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "REDIRECT_STATUS"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy: "200"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param:
> "REDIRECT_STATUS: 200"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "SCRIPT_FILENAME"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var: "/usr/lib"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var:
> "/cgi-bin/mailman/listinfo"



> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param:
> "SCRIPT_FILENAME: /usr/lib/cgi-bin/mailman/listinfo"



> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script copy:
> "PATH_INFO"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 http script var: "/users"
> 2012/06/14 00:39:48 [debug] 27873#0: *13 fastcgi param: "PATH_INFO:
> /users"

[snipp]

> Thanks
>
> p@rick

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

Hth

Aleks

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Running mailman within a domain

Patrick Ben Koetter June 13, 2012 06:44PM

Re: Running mailman within a domain

Aleksandar Lazic June 14, 2012 04:54AM

Re: Running mailman within a domain

Patrick Ben Koetter June 14, 2012 07:20AM

Re: Running mailman within a domain

Falko Timme June 14, 2012 05:18AM

Re: Running mailman within a domain

Patrick Ben Koetter June 14, 2012 06:46AM

Re: Running mailman within a domain

Sergey Budnevitch June 14, 2012 09:28AM

Re: Running mailman within a domain

Patrick Ben Koetter June 14, 2012 09:30AM

Re: Running mailman within a domain

Sergey Budnevitch June 14, 2012 10:46AM

Re: Running mailman within a domain

Reinis Rozitis June 14, 2012 11:08AM

SOLVED: Re: Running mailman within a domain

Patrick Ben Koetter June 14, 2012 11:16AM

Re: SOLVED: Re: Running mailman within a domain

Francis Daly June 14, 2012 06:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready