Using aliases with fast cgi results in... strange results.
With this config:
location /cgi-bin/ {
alias /home/nagios/nagios/sbin;
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
, if you request /cgi-bin/test.cgi, $document_root is changed to /home/nagios/nagios/sbin, as you would expect. However, $fastcgi_script_name remains /cgi-bin/test.cgi. Shouldn't $fastcgi_script_name and $uri be changed to reflect that fact that this is operating inside the alias? I would think $fastcgi_script_name and $uri would both be /test.cgi, and not include the "/cgi-bin".