Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
instaweb: load Apache mime and dir modules if they are needed
author
Eric Wong
<normalperson@yhbt.net>
Tue, 2 Jan 2007 08:57:11 +0000
(
00:57
-0800)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 3 Jan 2007 07:25:42 +0000
(23:25 -0800)
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>
git-instaweb.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
54b9e02
)
diff --git
a/git-instaweb.sh
b/git-instaweb.sh
index 16cd351f7f0d992be37be83017961c70731d4cc5..08362f43c0828ad52f1c0c52904dabe237fa90ec 100755
(executable)
--- 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
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
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
TypesConfig $fqgitdir/mime.types
DirectoryIndex gitweb.cgi
EOF