{"thread":{"id":"6194","subject":"[PATCH] instaweb: load Apache mime and dir modules if they are needed","startedAt":"2007-01-02T08:57:11Z","lastAt":"2007-01-02T08:57:11Z","messageCount":1,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"30665","messageId":"20070102085711.GA28842@mayonaise.dyndns.org","threadId":"6194","inReplyTo":null,"subject":"[PATCH] instaweb: load Apache mime and dir modules if they are needed","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-01-02T08:57:11Z","receivedAt":"2007-01-02T08:57:11Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"I've noticed that Apache 2.2 on a Debian etch machine has\nthese compiled as modules.\n\nAlso set ServerName to avoid a warning at startup.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-instaweb.sh |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex 16cd351..08362f4 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -160,10 +160,20 @@ apache2_conf () {\n \ttest \"$local\" = true && bind='127.0.0.1:'\n \techo 'text/css css' > $fqgitdir/mime.types\n \tcat > \"$conf\" <<EOF\n+ServerName \"git-instaweb\"\n ServerRoot \"$fqgitdir/gitweb\"\n DocumentRoot \"$fqgitdir/gitweb\"\n PidFile \"$fqgitdir/pid\"\n Listen $bind$port\n+EOF\n+\n+\tfor mod in mime dir; do\n+\t\tif test -e $module_path/mod_${mod}.so; then\n+\t\t\techo \"LoadModule ${mod}_module \" \\\n+\t\t\t     \"$module_path/mod_${mod}.so\" >> \"$conf\"\n+\t\tfi\n+\tdone\n+\tcat >> \"$conf\" <<EOF\n TypesConfig $fqgitdir/mime.types\n DirectoryIndex gitweb.cgi\n EOF\n-- \nEric Wong\n"}]}