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>
Eric Wong committed
Jan 2, 2007 at 00:57 UTC
44a167b007a20189200f4baf9ff4f24aa0f7571e
1 file changed
+10
git-instaweb.sh
+10
@@ -160,10 +160,20 @@ apache2_conf () {
160
test "$local" = true && bind='127.0.0.1:'
161
echo 'text/css css' > $fqgitdir/mime.types
162
cat > "$conf" <<EOF
163
+ServerName "git-instaweb"
164
ServerRoot "$fqgitdir/gitweb"
165
DocumentRoot "$fqgitdir/gitweb"
166
PidFile "$fqgitdir/pid"
167
Listen $bind$port
168
+EOF
169
+
170
+ for mod in mime dir; do
171
+ if test -e $module_path/mod_${mod}.so; then
172
+ echo "LoadModule ${mod}_module " \
173
+ "$module_path/mod_${mod}.so" >> "$conf"
174
+ fi
175
+ done
176
+ cat >> "$conf" <<EOF
177
TypesConfig $fqgitdir/mime.types
178
DirectoryIndex gitweb.cgi
179
EOF