提交 44a167b0 编写于 作者: E Eric Wong 提交者: Junio C Hamano

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: NEric Wong <normalperson@yhbt.net>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 54b9e022
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册