summaryrefslogtreecommitdiff
path: root/git-instaweb.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-10-18 23:00:45 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-10-18 23:00:45 -0700
commitd9499c80c1bd25fbb84037fd0c8aaaf99c4d3d28 (patch)
treefae91abd28fad58e91a7fd4a1ec001b38c42ce9b /git-instaweb.sh
parentdescribe: load refnames before calling describe() (diff)
parentinstaweb: support mod_cgid for apache2 (diff)
downloadtgif-d9499c80c1bd25fbb84037fd0c8aaaf99c4d3d28.tar.xz
Merge branch 'mr/instaweb-cgid'
* mr/instaweb-cgid: instaweb: support mod_cgid for apache2
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-xgit-instaweb.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index d96eddbe56..622a5f0eb2 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>