X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=git-instaweb.sh;h=b7342e22c88993756e7beb6582a896087e52a034;hb=24aea033138561e5501ee5dfb3459f3ae4940625;hp=6635fbefdf2a06e556716f91a70181ecf4f3252a;hpb=01aedc930b6c3b46d229e33ac6f70b3d91fc1d2b;p=git.git diff --git a/git-instaweb.sh b/git-instaweb.sh index 6635fbefd..b7342e22c 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -43,7 +43,8 @@ test -z "$port" && port=1234 resolve_full_httpd () { case "$httpd" in - *apache2*|*lighttpd*) + *apache2*|*lighttpd*|*httpd*) + # yes, *httpd* covers *lighttpd* above, but it is there for clarity # ensure that the apache2/lighttpd command ends with "-f" if ! echo "$httpd" | sane_grep -- '-f *$' >/dev/null 2>&1 then @@ -300,7 +301,13 @@ EOF } apache2_conf () { - test -z "$module_path" && module_path=/usr/lib/apache2/modules + if test -z "$module_path" + then + test -d "/usr/lib/httpd/modules" && + module_path="/usr/lib/httpd/modules" + test -d "/usr/lib/apache2/modules" && + module_path="/usr/lib/apache2/modules" + fi bind= test x"$local" = xtrue && bind='127.0.0.1:' echo 'text/css css' > "$fqgitdir/mime.types" @@ -314,8 +321,10 @@ PidFile "$fqgitdir/pid" Listen $bind$port EOF - for mod in mime dir; do - if test -e $module_path/mod_${mod}.so; then + for mod in mime dir env log_config + do + if test -e $module_path/mod_${mod}.so + then echo "LoadModule ${mod}_module " \ "$module_path/mod_${mod}.so" >> "$conf" fi @@ -334,7 +343,7 @@ EOF cat >> "$conf" < SetHandler perl-script @@ -364,6 +373,9 @@ EOF echo "ScriptSock logs/gitweb.sock" >> "$conf" fi cat >> "$conf" < Options +ExecCGI @@ -560,7 +572,7 @@ case "$httpd" in *lighttpd*) lighttpd_conf ;; -*apache2*) +*apache2*|*httpd*) apache2_conf ;; webrick)