Skip to content

Commit d9499c8

Browse files
committed
Merge branch 'mr/instaweb-cgid'
* mr/instaweb-cgid: instaweb: support mod_cgid for apache2
2 parents fb423da + 10d1432 commit d9499c8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

git-instaweb.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,21 @@ EOF
317317
resolve_full_httpd
318318
list_mods=$(echo "$full_httpd" | sed "s/-f$/-l/")
319319
$list_mods | grep 'mod_cgi\.c' >/dev/null 2>&1 || \
320-
echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
320+
if test -f "$module_path/mod_cgi.so"
321+
then
322+
echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
323+
else
324+
$list_mods | grep 'mod_cgid\.c' >/dev/null 2>&1 || \
325+
if test -f "$module_path/mod_cgid.so"
326+
then
327+
echo "LoadModule cgid_module $module_path/mod_cgid.so" \
328+
>> "$conf"
329+
else
330+
echo "You have no CGI support!"
331+
exit 2
332+
fi
333+
echo "ScriptSock logs/gitweb.sock" >> "$conf"
334+
fi
321335
cat >> "$conf" <<EOF
322336
AddHandler cgi-script .cgi
323337
<Location /gitweb.cgi>

0 commit comments

Comments
 (0)