Welcome! Log In Create A New Profile

Advanced

alias + fastcgi

July 17, 2011 09:16PM
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".
Subject Author Posted

alias + fastcgi

sonicsnes July 17, 2011 09:16PM

Re: alias + fastcgi

Edho Arief July 17, 2011 09:20PM

Re: alias + fastcgi

sonicsnes July 17, 2011 09:22PM

Re: alias + fastcgi

António P. P. Almeida July 17, 2011 10:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 287
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready