git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] instaweb: load Apache mime and dir modules if they are needed

From
EWEric Wong <normalperson@yhbt.net>
Date
Jan 2, 2007, 08:57 UTC
Message-ID
<20070102085711.GA28842@mayonaise.dyndns.org>

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>
---
 git-instaweb.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 16cd351..08362f4 100755
--- 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
+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
-- 
Eric Wong
Message 1 of 1 in “instaweb: load Apache mime and dir modules if they are needed”
  1. instaweb: load Apache mime and dir modules if they are neededEric Wong, Jan 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.