Skip to content

Commit

Permalink
instaweb: load Apache mime and dir modules if they are needed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Jan 3, 2007
1 parent 54b9e02 commit 44a167b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions git-instaweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44a167b

Please sign in to comment.