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

[PATCH 2/5] git-instaweb: some Apache have mod_cgi builtin

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 26, 2006, 14:33 UTC
Message-ID
<Pine.LNX.4.63.0607261633060.29667@wbgn013.biozentrum.uni-wuerzburg.de>
So test for it, and do not always try to load mod_cgi.o.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-instaweb.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 63b18b9..9829c59 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -183,8 +183,10 @@ PerlPassEnv GIT_EXEC_DIR
 EOF
 	else
 		# plain-old CGI
+		list_mods=`echo "$httpd" | sed "s/-f$/-l/"`
+		$list_mods | grep 'mod_cgi\.c' >/dev/null || \
+		echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
 		cat >> "$conf" <<EOF
-LoadModule cgi_module $module_path/mod_cgi.so
 AddHandler cgi-script .cgi
 <Location /gitweb.cgi>
 	Options +ExecCGI
-- 
1.4.2.rc2.g6a4e
Message 1 of 1 in “git-instaweb: some Apache have mod_cgi builtin”
  1. 2/5 git-instaweb: some Apache have mod_cgi builtinJohannes Schindelin, Jul 26, 2006

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.