Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 50154 invoked by uid 500); 23 Jan 2002 15:14:06 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 50140 invoked from network); 23 Jan 2002 15:14:04 -0000 Message-Id: X-Mailer: Novell GroupWise 5.5.5 Date: Wed, 23 Jan 2002 17:13:45 +0200 From: "Udcsweb2" To: Subject: Fwd: Apache Environment Variables and suexec Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_E1BC9E28.A2C3B427" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=_E1BC9E28.A2C3B427 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=20 add the following to httpd.conf to facilitate: SetEnv ORACLE_HOME SetEnv ORACLE_ROOT SetEnv ORACLE_SID This worked fine, until I had to set up virtual hosts. We are consolidatin= g 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=3D/usr/local/apache \ --enable-module=3Dso \ --enable-module=3Dssl \ --enable-module=3Dexample \ --enable-suexec \ --suexec-caller=3Dnobody \ --suexec-docroot=3D/ \ --suexec-uidmin=3D80 \ --suexec-gidmin=3D80 \ --with-perl=3D/usr/local/bin/perl 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=20 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 fix. Is there not a more, dynamic way to set this? Is anyone doing development on suexec that might help? Tx Johan van den Berg TUWS Consultant=20 University of South Africa --=_E1BC9E28.A2C3B427 Content-Type: text/plain Content-Disposition: attachment; filename="TEXT.htm" Content-Description: HTML
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:
 
  SetEnv ORACLE_HOME
  SetEnv ORACLE_ROOT
  SetEnv ORACLE_SID
 
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 \
  --with-perl=/usr/local/bin/perl
 
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 fix.
 
Is there not a more, dynamic way to set this?
 
Is anyone doing development on suexec that might help?
 
Tx
Johan van den Berg
TUWS Consultant
University of South Africa
--=_E1BC9E28.A2C3B427--