git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: FastCGI support in gitweb

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 4, 2008, 00:19 UTC
Message-ID
<200803040119.22240.jnareb@gmail.com>
In-Reply-To
<47CBEED2.30808@vilain.net>
On Mon, 3 Mar 2008, Sam Vilain wrote:
Show 19 quoted lines
> Jakub Narebski wrote:
>> First, as far as I understand it, the patch made gitweb had to be used
>> with FastCGI server.  It has no comments in code, and if I remember
>> correctly the commit message was also fairly nonexistent.  It mixes
>> FastCGI changes with site-wide changes.  It wrapped the whole file in
>> "until last request" loop instead of wrapping dispatch only.
>> 
>> Also I am not sure if gitweb doesn't rely on variables being correctly
>> set which they are not in FastCGI mode.
>> 
>> But most important part: it was never resend (IIRC it was send when
>> gitweb development was in separate repository)
>> 
>> 
>> I have attached the FastCGI patch and CC-ed the author.
> 
> Thanks.  I didn't submit this because I couldn't fix the bugs in it.
> Glad you found it.  I had to make many changes in a similar vein with a
> current gitweb version; did it work for you in its current form?

I couldn't test it with FastCGI server, as I use Apache2, and all FastCGI modules for Apache are third part modules. Besides, it doesn't make much sense to use generic FastCGI for Perl, when there is mod_perl module.

For me for the FastCGI change to be made into mainline it would have
to have the following properties:
 * it should be able to run as both CGI module, and under mod_perl
   module (in legacy mode with ModPerl::Registry) without trouble
 * is should be able to run even if CGI::Fast or FCGI Perl modules
   are not installed in the system
 * the loop over requests should try to be minimal, and not encompass
   whole file
The last condition would probably require to separate option parsing
and validation into separate subroutine.
> You can get it to run externally using FCGI_SOCKET=:3000 (eg, to listen
> on FastCGI TCP port 3000)
Could you elaborate on this?

P.S. It would be good to have examples for web servers other than Apache2 how to configure them to run gitweb: perhaps lighthttpd, Cheetah, maybe IIS...

-- 
Jakub Narebski
Poland
Previous: Sam VilainNext: John Goerzen
Message 4 of 8 in “FastCGI support in gitweb”
  1. Juan Jose ComellasMar 1, 2008
  2. Jakub NarebskiMar 1, 2008
  3. Sam VilainMar 3, 2008
  4. Jakub NarebskiMar 4, 2008
  5. John GoerzenMar 4, 2008
  6. Jakub NarebskiMar 4, 2008
  7. John GoerzenMar 4, 2008
  8. Jakub NarebskiMar 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.