httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Udcsweb2" <>
Subject Fwd: Apache Environment Variables and suexec
Date Wed, 23 Jan 2002 15:13:45 GMT
I am running Pro*C compiled applications on Apache 1.3.20, and have the following problem:

The Pro*C library makes use of environment variables to connect to a Oracle 8.0.5 database,
and I had to 
add the following to httpd.conf to facilitate:


This worked fine, until I had to set up virtual hosts.  We are consolidating 5 servers onto
1 machine, and started
making use of name-based virtual hosting. The problem is that each virtual host needs to be
run as a different user.

I recompiled apache, using the following configuration parameters:
./configure \
  --prefix=/usr/local/apache \
  --enable-module=so \
  --enable-module=ssl \
  --enable-module=example \
  --enable-suexec \
  --suexec-caller=nobody \
  --suexec-docroot=/ \
  --suexec-uidmin=80 \
  --suexec-gidmin=80 \

Good to go... Almost.

suexec worked very good, the server was switching users as needed, but the site wouldn't run.

After some time spent analizing the problem, it came to me that the environment variables
were gone.  I checked it using /cgi-bin/printenv,
and was correct.

After browsing the source of suexec, it was pretty obvious why.  I had to add 2 lines to suexec.c
in the function clean_env to 
allow the passing of environment variables starting with "ORACLE_", much the same as it does
for "HTTP_".

Everything works, but as a new entry as a programmer on apache, I am not happy with such a

Is there not a more, dynamic way to set this?

Is anyone doing development on suexec that might help?

Johan van den Berg
TUWS Consultant 
University of South Africa

View raw message