зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
54b9e0225a
Коммит
44a167b007
|
@ -160,10 +160,20 @@ apache2_conf () {
|
||||||
test "$local" = true && bind='127.0.0.1:'
|
test "$local" = true && bind='127.0.0.1:'
|
||||||
echo 'text/css css' > $fqgitdir/mime.types
|
echo 'text/css css' > $fqgitdir/mime.types
|
||||||
cat > "$conf" <<EOF
|
cat > "$conf" <<EOF
|
||||||
|
ServerName "git-instaweb"
|
||||||
ServerRoot "$fqgitdir/gitweb"
|
ServerRoot "$fqgitdir/gitweb"
|
||||||
DocumentRoot "$fqgitdir/gitweb"
|
DocumentRoot "$fqgitdir/gitweb"
|
||||||
PidFile "$fqgitdir/pid"
|
PidFile "$fqgitdir/pid"
|
||||||
Listen $bind$port
|
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
|
TypesConfig $fqgitdir/mime.types
|
||||||
DirectoryIndex gitweb.cgi
|
DirectoryIndex gitweb.cgi
|
||||||
EOF
|
EOF
|
||||||
|
|
Загрузка…
Ссылка в новой задаче