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

[PATCH 2/3] git-instaweb: Fix Apache environment variable passing

From
Dan McGee <dpmcgee@gmail.com>
Date
Jun 30, 2010, 02:44 UTC
Message-ID
<1277865900-25044-2-git-send-email-dpmcgee@gmail.com>
In-Reply-To
<1277865900-25044-1-git-send-email-dpmcgee@gmail.com>

We were passing the non-existent GIT_EXEC_DIR through instead of the real GIT_EXEC_PATH. In addition, these weren't being passed at all for CGI (non mod_perl) execution so get them included there as well.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
 git-instaweb.sh |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index a01476a..1d349b8 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -314,7 +314,7 @@ PidFile "$fqgitdir/pid"
 Listen $bind$port
 EOF
 
-	for mod in mime dir log_config; do
+	for mod in mime dir env log_config; do
 		if test -e $module_path/mod_${mod}.so; then
 			echo "LoadModule ${mod}_module " \
 			     "$module_path/mod_${mod}.so" >> "$conf"
@@ -334,7 +334,7 @@ EOF
 		cat >> "$conf" <<EOF
 LoadModule perl_module $module_path/mod_perl.so
 PerlPassEnv GIT_DIR
-PerlPassEnv GIT_EXEC_DIR
+PerlPassEnv GIT_EXEC_PATH
 PerlPassEnv GITWEB_CONFIG
 <Location /gitweb.cgi>
 	SetHandler perl-script
@@ -364,6 +364,9 @@ EOF
 			echo "ScriptSock logs/gitweb.sock" >> "$conf"
 		fi
 		cat >> "$conf" <<EOF
+PassEnv GIT_DIR
+PassEnv GIT_EXEC_PATH
+PassEnv GITWEB_CONFIG
 AddHandler cgi-script .cgi
 <Location /gitweb.cgi>
 	Options +ExecCGI
-- 
1.7.1
Previous: Dan McGeeNext: Dan McGee
Message 2 of 12 in “git-instaweb: Fix custom apache log placement”
  1. 1/3 git-instaweb: Fix custom apache log placementDan McGee, Jun 30, 2010
  2. 2/3 git-instaweb: Fix Apache environment variable passingDan McGee, Jun 30, 2010
  3. 3/3 git-instaweb: Don't assume Apache executable is named apache2Dan McGee, Jun 30, 2010
  4. Eric WongJun 30, 2010
  5. 3/3 git-instaweb: Don't assume Apache executable is named apache2Dan McGee, Jun 30, 2010
  6. Junio C HamanoJun 30, 2010
  7. Dan McGeeJul 22, 2010
  8. Eric WongJul 22, 2010
  9. Dan McGeeJul 23, 2010
  10. Junio C HamanoJul 23, 2010
  11. Dan McGeeJun 30, 2010
  12. Eric WongJul 23, 2010

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.