3

i'm using mailman with nginx to get its web interface this my nginx config :

location /cgi-bin/mailman {
           root /usr/lib/;
           fastcgi_split_path_info (/cgi-bin/mailman[^/]*)/(.*)$;
           include /etc/nginx/fastcgi_params;
           fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
           fastcgi_param PATH_INFO $fastcgi_path_info;
           fastcgi_param PATH_TRANSLATED $fastcgi_path_info;
           fastcgi_intercept_errors on;
           fastcgi_pass unix:/var/run/fcgiwrap.socket;
    }

it's seems to work good when i call mydomain.com/cgi-bin/mailman/listinfo, but when I request something like : mydomain.com/cgi-bin/mailman/listinfo/mylist i get 403 and in nginx error log :

FastCGI sent in stderr: "Cannot chdir to script directory (/usr/lib/cgi-bin/mailman/listinfo)" while reading response header from upstream

I tried every regex available to get it work but it still give 403 any help or any clue to get it work .

eyadof
  • 207
  • 2
  • 6

1 Answers1

1

I had the same problem. I find a solution somewhere: just comment out the

fastcgi_param  SCRIPT_FILENAME   $request_filename;

line in /etc/nginx/fastcgi_params. It works, but I think it is nicer not to comment out this line, just swap the order of including this file and defining your own SCRIPT_FILENAME:

location /cgi-bin/mailman {
           root /usr/lib/;
           fastcgi_split_path_info (/cgi-bin/mailman[^/]*)/(.*)$;
           fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
           include /etc/nginx/fastcgi_params;
           fastcgi_param PATH_INFO $fastcgi_path_info;
           fastcgi_param PATH_TRANSLATED $fastcgi_path_info;
           fastcgi_intercept_errors on;
           fastcgi_pass unix:/var/run/fcgiwrap.socket; }

Now it works for me.

havasi
  • 126
  • 1