aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-10-18 23:00:45 -0700
committerJunio C Hamano <gitster@pobox.com>2009-10-18 23:00:45 -0700
commitd9499c80c1bd25fbb84037fd0c8aaaf99c4d3d28 (patch)
treefae91abd28fad58e91a7fd4a1ec001b38c42ce9b
parentfb423da0e5668f3945c5a3e34fe5953cde6985a4 (diff)
parent10d1432aece21ac65a89fe962b1c3019ec1f46e0 (diff)
downloadgit-d9499c80c1bd25fbb84037fd0c8aaaf99c4d3d28.tar.gz
git-d9499c80c1bd25fbb84037fd0c8aaaf99c4d3d28.tar.xz
Merge branch 'mr/instaweb-cgid'
* mr/instaweb-cgid: instaweb: support mod_cgid for apache2
-rwxr-xr-xgit-instaweb.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index d96eddbe5..622a5f0eb 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>