Bug in NginxHttpFcgiModule's fastcgi_split_path_info function?

Mark Alan varia at e-healthexpert.org
Wed Nov 10 14:03:01 MSK 2010


  While using Ubuntu 10.10+Nginx 0.8.53+gnosek's fcgiwrap to serve a
Mailman mailing list server
<http://www.gnu.org/software/mailman/index.html>, that was installed as
stated in <http://wiki.nginx.org/Mailman>, I keep getting the error:

   [error]  FastCGI sent in stderr: "Cannot get script name, is
   DOCUMENT_ROOT and SCRIPT_NAME set and is the script executable?"

These attempts were successful:
   http://mail.example.com/ => shows standard Mailman Welcome page,
browser bar shows: http://mail.example.com/mailman/listinfo
   http://mail.example.com/listinfo => shows standard Mailman Welcome
page, this time browser bar shows: http://mail.example.com/listinfo
   http://mail.example.com/admin  => shows standard Mailman Admin Links
page, browser bar shows: http://mail.example.com/admin
   http://mail.example.com/images/mailman/ => shows "403 Forbidden"
   page, as expected http://mail.example.com/pipermail/  => shows "Index
of /pipermail/" page, as expected
   http://mail.example.com/mailman/private  => shows "You must specify a
list.", as expected

All other attempts were unsuccessful, such as:
   Clicking in "the mailing list overview page" link
<http://mail.example.com/cgi-bin/mailman/listinfo> or on the "List"
"Mailman" link,

   Those only output a "403" (produced by fcgiwrap?)

   And the nginx error log shows:
  [error] 1181#0: *17 FastCGI sent in
   stderr: "Cannot get script name, is DOCUMENT_ROOT and SCRIPT_NAME
   set and is the script executable?" while reading response header
   from upstream, client: 127.0.1.1,
   server: mail.example.com,
   request: "GET /cgi-bin/mailman/listinfo HTTP/1.1",
   upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:",
   host: "mail.example.com",
   referrer: "http://mail.example.com/admin"

  My nginx file has:
server {
	listen 80;
	server_name mail.example.com;
	root /usr/lib/cgi-bin;
	location = / {
		rewrite ^ /mailman/listinfo permanent;
	} 
	location / {
		rewrite ^ /mailman$uri;
	}
	location /mailman/ {
		fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
		#include /etc/nginx/fastcgi_params;
		include fastcgi_params;
		fastcgi_param GATEWAY_INTERFACE CGI/1.1;
		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_pass
		unix:/var/run/fcgiwrap.socket;
	}
	location /images/mailman {
		alias /var/lib/mailman/icons;
	}
	location /pipermail {
		alias /var/lib/mailman/archives/public;
		autoindex on;
	}
}

  My, default and unchanged, /etc/mailman/mm_cfg.py, that has:
DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/'
PRIVATE_ARCHIVE_URL = '/cgi-bin/mailman/private'
DEFAULT_EMAIL_HOST = 'mail.example.com'
DEFAULT_URL_HOST   = 'mail.example.com'

  My nginx -V
nginx version: nginx/0.8.53
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
--with-http_ssl_module --without-http_limit_req_module
--without-mail_pop3_module --without-mail_smtp_module
--without-mail_imap_module --without-http_uwsgi_module
--without-http_scgi_module --without-http-cache

  My cat /etc/hosts
127.0.0.1	localhost.localdomain	localhost
127.0.1.1	mail.example.com	mail
127.1.1.1	www.example.com example.com
--



More information about the nginx mailing list