Welcome! Log In Create A New Profile

Advanced

fastcgi_index - am I missing something obvious?

Sandra Snan
October 15, 2014 07:20AM
So I have the same setup on two different servers, using fcgiwrap to
serve some basic classic style cgi scripts.

On both,
http://serverdomain.whatever/cgi-bin/index.cgi works great
and other explicit .cgi urls work.
But only on one of them, http://serverdomain.whatever/cgi-bin/ takes me
to the index.cgi. On the other I get a 502.
What am I missing?
I think the unix permissions of /usr/lib, /usr/lib/cgi-bin and its
contents, and /var/www are the same on both servers.

The error log is

2014/10/15 11:16:40 [error] 30892#0: *845 upstream prematurely closed
FastCGI stdout while reading response header from upstream, client: [my
client ip], server: [my server adress], request: "GET /cgi-bin/
HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host:
"[my server adress]"

Sandra
Here is the conf:

server {
listen 80;

root /var/www/; # not really relevant
index index.html;

server_name my_server_name_went_here;

location / {
try_files $uri $uri/ /index.html;
}

# this, as the rest of the conf, is the same on both

location /cgi-bin/ {
gzip off;
# the cgi-bin directory is in /usr/lib
root /usr/lib;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
# this next line seems to work on one, not the other
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME /usr/lib$fastcgi_script_name;
}
}

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

fastcgi_index - am I missing something obvious?

Sandra Snan October 15, 2014 07:20AM

Re: fastcgi_index - am I missing something obvious?

Francis Daly October 15, 2014 07:04PM

Re: fastcgi_index - am I missing something obvious?

Sandra Snan October 16, 2014 01:42AM

Re: fastcgi_index - am I missing something obvious?

Francis Daly October 16, 2014 07:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 323
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