Skip to content

Commit

Permalink
git-instaweb: Fix Apache environment variable passing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan McGee authored and Eric Wong committed Jul 23, 2010
1 parent 1849f01 commit 2989f51
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions git-instaweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2989f51

Please sign in to comment.