gnosek / fcgiwrap

Simple FastCGI wrapper for CGI scripts
http://nginx.localdomain.pl/
MIT License
407 stars 134 forks source link

fcgiwrap doesn't like the default fastcgi_params #41

Open bellaxie opened 7 years ago

bellaxie commented 7 years ago

Hi there,

This is how I configure the /cgi-bin/ location in the nginx configure file, it doesn't work if I include /etc/nginx/fastcgi_params, and it worked if I comment this line out. I'm assuming either fcgiwrap doesn't like some of the default fastcgi_params or the params I gave in the location block gets overwritten by the default params. could you advise? `
location ~ ^/cgi-bin/nagios3/(..cgi.) { include /etc/nginx/fastcgi_params;

fastcgi_pass  unix:/var/run/fcgiwrap.socket;
    auth_basic                         "Restricted";
    auth_basic_user_file               /etc/nagios3/htpasswd.users;
    fastcgi_param AUTH_USER            $remote_user;
    fastcgi_param REMOTE_USER          $remote_user;
    fastcgi_param REQUEST_METHOD       $request_method;
    fastcgi_param DOCUMENT_ROOT        /usr/lib/cgi-bin/nagios3;
    fastcgi_param SCRIPT_FILENAME      /usr/lib/cgi-bin/nagios3/$1;
    fastcgi_param SCRIPT_NAME          $1;
    fastcgi_param QUERY_STRING         $query_string;

} `