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

[PATCH] instaweb: support mod_cgid for apache2

From
Mark Rada <marada@uwaterloo.ca>
Date
Sep 26, 2009, 18:12 UTC
Message-ID
<4ABE5990.2060902@mailservices.uwaterloo.ca>

Some people have mod_cgid instead of mod_cgi, most likely as a result of choosing a threaded MPM.

In cases where the user has both modules, mod_cgi will be preferred in order to maintain a simpler setup.

This patch also causes instaweb to print a message and die in cases where there is no module that instaweb knows how to handle.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
---
	I thought I would squeeze this patch in while I was at it today.
 git-instaweb.sh |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index d96eddb..622a5f0 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -317,7 +317,21 @@ EOF
 		resolve_full_httpd
 		list_mods=$(echo "$full_httpd" | sed "s/-f$/-l/")
 		$list_mods | grep 'mod_cgi\.c' >/dev/null 2>&1 || \
-		echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
+		if test -f "$module_path/mod_cgi.so"
+		then
+			echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
+		else
+			$list_mods | grep 'mod_cgid\.c' >/dev/null 2>&1 || \
+			if test -f "$module_path/mod_cgid.so"
+			then
+				echo "LoadModule cgid_module $module_path/mod_cgid.so" \
+					>> "$conf"
+			else
+				echo "You have no CGI support!"
+				exit 2
+			fi
+			echo "ScriptSock logs/gitweb.sock" >> "$conf"
+		fi
 		cat >> "$conf" <<EOF
 AddHandler cgi-script .cgi
 <Location /gitweb.cgi>
-- 
1.6.4.GIT
Message 1 of 1 in “instaweb: support mod_cgid for apache2”
  1. instaweb: support mod_cgid for apache2Mark Rada, Sep 26, 2009

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.