Skip to content

Commit 93ded33

Browse files
committed
Merge branch 'sk/instaweb-rh-update'
"git instaweb" has been adjusted to run better with newer Apache on RedHat based distros. * sk/instaweb-rh-update: git-instaweb: fix apache2 config with apache >= 2.4 git-instaweb: support Fedora/Red Hat apache module path
2 parents 02c51a2 + 757b124 commit 93ded33

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

git-instaweb.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,17 @@ EOF
326326
}
327327

328328
apache2_conf () {
329-
if test -z "$module_path"
330-
then
331-
test -d "/usr/lib/httpd/modules" &&
332-
module_path="/usr/lib/httpd/modules"
333-
test -d "/usr/lib/apache2/modules" &&
334-
module_path="/usr/lib/apache2/modules"
335-
fi
329+
for candidate in \
330+
/etc/httpd \
331+
/usr/lib/apache2 \
332+
/usr/lib/httpd ;
333+
do
334+
if test -d "$candidate/modules"
335+
then
336+
module_path="$candidate/modules"
337+
break
338+
fi
339+
done
336340
bind=
337341
test x"$local" = xtrue && bind='127.0.0.1:'
338342
echo 'text/css css' > "$fqgitdir/mime.types"
@@ -356,7 +360,7 @@ EOF
356360
break
357361
fi
358362
done
359-
for mod in mime dir env log_config authz_core
363+
for mod in mime dir env log_config authz_core unixd
360364
do
361365
if test -e $module_path/mod_${mod}.so
362366
then

0 commit comments

Comments
 (0)