git-instaweb: Fix Apache environment variable passing
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> Acked-by: Eric Wong <normalperson@yhbt.net>
Dan McGee committed
Jun 29, 2010 at 21:44 UTC
2989f516d54a8d453edefbfe955459d7944aedb5
1 file changed
+5
-2
git-instaweb.sh
+5
-2
@@ -314,7 +314,7 @@ PidFile "$fqgitdir/pid"
314
Listen $bind$port
315
EOF
316
317
- for mod in mime dir log_config; do
317
+ for mod in mime dir env log_config; do
318
if test -e $module_path/mod_${mod}.so; then
319
echo "LoadModule ${mod}_module " \
320
"$module_path/mod_${mod}.so" >> "$conf"
@@ -334,7 +334,7 @@ EOF
334
cat >> "$conf" <<EOF
335
LoadModule perl_module $module_path/mod_perl.so
336
PerlPassEnv GIT_DIR
337
-PerlPassEnv GIT_EXEC_DIR
337
+PerlPassEnv GIT_EXEC_PATH
338
PerlPassEnv GITWEB_CONFIG
339
<Location /gitweb.cgi>
340
SetHandler perl-script
@@ -364,6 +364,9 @@ EOF
364
echo "ScriptSock logs/gitweb.sock" >> "$conf"
365
fi
366
cat >> "$conf" <<EOF
367
+PassEnv GIT_DIR
368
+PassEnv GIT_EXEC_PATH
369
+PassEnv GITWEB_CONFIG
370
AddHandler cgi-script .cgi
371
<Location /gitweb.cgi>
372
Options +ExecCGI