Welcome! Log In Create A New Profile

Advanced

Re: gitweb

Francis Daly
December 02, 2011 04:30PM
On Fri, Dec 02, 2011 at 08:46:49AM -0500, CGIMan wrote:

Hi there,

> I am having a hard time getting cgi (gitweb) to work.
> That's the relefvant part of my config:

nginx doesn't "do" cgi, but it does do fastcgi. So you are using a
separate program to map between the two...

> fastcgi_pass unix:/var/run/fcgiwrap.socket;
> fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/gitweb.cgi;

> That's nginx output:
>
> 2011/12/02 13:40:37 [error] 6046#0: *1 FastCGI sent in stderr: "Cannot
> get script name, is DOCUMENT_ROOT and SCRIPT_NAME set and is the script
> executable?" while reading response header from upstream,

....and it looks like that program cares about SCRIPT_NAME and
DOCUMENT_ROOT, and presumably not about SCRIPT_FILENAME.

So I'd guess that you want to remove the SCRIPT_FILENAME line, and replace it with

fastcgi_param SCRIPT_NAME gitweb.cgi;
fastcgi_param DOCUMENT_ROOT /usr/lib/cgi-bin;

Your fcgiwrap program may have more documentation on precisely what
parameters it expects and needs. Possibly there should be an extra "/",
either at the end of one param or at the start of the other.

Good luck,

f
--
Francis Daly francis@daoine.org

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

gitweb

CGIMan December 02, 2011 08:46AM

Re: gitweb

Francis Daly December 02, 2011 04:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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