Skip to content

Commit

Permalink
git-instaweb: some Apache have mod_cgi builtin
Browse files Browse the repository at this point in the history
So test for it, and do not always try to load mod_cgi.o.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Jul 26, 2006
1 parent b7a036b commit 2b5d2d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-instaweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b5d2d8

Please sign in to comment.