summaryrefslogtreecommitdiff
path: root/git-instaweb.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-01-02 08:57:11 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-03 07:25:42 (GMT)
commit44a167b007a20189200f4baf9ff4f24aa0f7571e (patch)
treec9c661706c11d2b1908ca896c3907a513d148080 /git-instaweb.sh
parent54b9e0225ad150b4528d7a12f2196ad46f058302 (diff)
downloadgit-44a167b007a20189200f4baf9ff4f24aa0f7571e.zip
git-44a167b007a20189200f4baf9ff4f24aa0f7571e.tar.gz
git-44a167b007a20189200f4baf9ff4f24aa0f7571e.tar.bz2
instaweb: load Apache mime and dir modules if they are needed
I've noticed that Apache 2.2 on a Debian etch machine has these compiled as modules. Also set ServerName to avoid a warning at startup. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-xgit-instaweb.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 16cd351..08362f4 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -160,10 +160,20 @@ apache2_conf () {
test "$local" = true && bind='127.0.0.1:'
echo 'text/css css' > $fqgitdir/mime.types
cat > "$conf" <<EOF
+ServerName "git-instaweb"
ServerRoot "$fqgitdir/gitweb"
DocumentRoot "$fqgitdir/gitweb"
PidFile "$fqgitdir/pid"
Listen $bind$port
+EOF
+
+ for mod in mime dir; do
+ if test -e $module_path/mod_${mod}.so; then
+ echo "LoadModule ${mod}_module " \
+ "$module_path/mod_${mod}.so" >> "$conf"
+ fi
+ done
+ cat >> "$conf" <<EOF
TypesConfig $fqgitdir/mime.types
DirectoryIndex gitweb.cgi
EOF