threads / discuss / 20154

instaweb does not start because of a small syntax error in .git/gitweb/httpd.conf

Subject: instaweb does not start because of a small syntax error in .git/gitweb/httpd.conf

## tl;dr

3 messages between Jul 18, 2009 and Jul 26, 2009.

replies: 2people: 3as markdown or json

Bodo Schlecht· Jul 18, 2009, 15:08 UTC · lore
When I start instaweb with
  git instaweb
I get this error:
  Syntax error on line 8 of /media/disk1part4/Eigene Dateien/superdigi/superdigientwicklung/.git/gitweb/httpd.conf:
  TypesConfig takes one argument, the MIME types config file
  Could not execute http daemon apache2 -f.
Line 8 of /.git/gitweb/httpd.conf reads
  TypesConfig /media/disk1part4/Eigene Dateien/superdigi/superdigientwicklung/.git/mime.types
As you see, there is a space in the path so it should be quotes:
  TypesConfig "/media/disk1part4/Eigene Dateien/superdigi/superdigientwicklung/.git/mime.types"
In all other lines of http.conf the path is correctly in quotes:
  ServerName "git-instaweb"
  ServerRoot "/media/disk1part4/Eigene Dateien/superdigi/superdigientwicklung/.git/gitweb"
  DocumentRoot "/media/disk1part4/Eigene Dateien/superdigi/superdigientwicklung/.git/gitweb"
  PidFile "/media/disk1part4/Eigene Dateien/superdigi/superdigientwicklung/.git/pid"
  Listen 127.0.0.1:4321
  LoadModule mime_module  /usr/lib/apache2/modules/mod_mime.so
  LoadModule dir_module  /usr/lib/apache2/modules/mod_dir.so
  TypesConfig /media/disk1part4/Eigene Dateien/superdigi/superdigientwicklung/.git/mime.types
  DirectoryIndex gitweb.cgi
  LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
  AddHandler cgi-script .cgi
  <Location /gitweb.cgi>
    Options +ExecCGI
  </Location>
Sean Estabrooks· Jul 18, 2009, 16:45 UTC · re: Bodo Schlecht · lore

[PATCH] Trivial path quoting fixes in git-instaweb

Bodo Schlecht noticed that Instaweb didn't propely quote all
path instances in the Apache config file it generated.
---
 git-instaweb.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 5f4419b..32f6496 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -256,7 +256,7 @@ apache2_conf () {
 	mkdir -p "$GIT_DIR/gitweb/logs"
 	bind=
 	test x"$local" = xtrue && bind='127.0.0.1:'
-	echo 'text/css css' > $fqgitdir/mime.types
+	echo 'text/css css' > "$fqgitdir/mime.types"
 	cat > "$conf" <<EOF
 ServerName "git-instaweb"
 ServerRoot "$fqgitdir/gitweb"
@@ -272,7 +272,7 @@ EOF
 		fi
 	done
 	cat >> "$conf" <<EOF
-TypesConfig $fqgitdir/mime.types
+TypesConfig "$fqgitdir/mime.types"
 DirectoryIndex gitweb.cgi
 EOF
 
-- 
1.6.3.3
Eric Wong· Jul 26, 2009, 10:10 UTC · re: Sean Estabrooks · lore

Re: [PATCH] Trivial path quoting fixes in git-instaweb

Sean Estabrooks <seanlkml@sympatico.ca> wrote:
> 
> Bodo Schlecht noticed that Instaweb didn't propely quote all
> path instances in the Apache config file it generated.
Works for me here, thank you.
Acked-by: Eric Wong <normalperson@yhbt.net>
Show 27 quoted lines
> ---
>  git-instaweb.sh |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/git-instaweb.sh b/git-instaweb.sh
> index 5f4419b..32f6496 100755
> --- a/git-instaweb.sh
> +++ b/git-instaweb.sh
> @@ -256,7 +256,7 @@ apache2_conf () {
>  	mkdir -p "$GIT_DIR/gitweb/logs"
>  	bind=
>  	test x"$local" = xtrue && bind='127.0.0.1:'
> -	echo 'text/css css' > $fqgitdir/mime.types
> +	echo 'text/css css' > "$fqgitdir/mime.types"
>  	cat > "$conf" <<EOF
>  ServerName "git-instaweb"
>  ServerRoot "$fqgitdir/gitweb"
> @@ -272,7 +272,7 @@ EOF
>  		fi
>  	done
>  	cat >> "$conf" <<EOF
> -TypesConfig $fqgitdir/mime.types
> +TypesConfig "$fqgitdir/mime.types"
>  DirectoryIndex gitweb.cgi
>  EOF
>  
> -- 

← back to recent threads