alias + fastcgi

sonicsnes nginx-forum at nginx.us
Mon Jul 18 01:16:21 UTC 2011


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".

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,212501,212501#msg-212501




More information about the nginx mailing list