- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Apache configuration
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2003 11:15 PM
тАО05-26-2003 11:15 PM
doesn't work? I wrote this
in httpd.conf:
SetEnv ORACLE_HOME /home/oracleclient/oracle_home
Order allow,deny
Allow from all
Options +ExecCGI
But no ORACLE_HOME env variable could be found by my cgi scripts. No errors in apache's logs.
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 12:15 AM
тАО05-27-2003 12:15 AM
Re: Apache configuration
You can put SetEnv in server config or virtual server config
Vitaly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 12:27 AM
тАО05-27-2003 12:27 AM
Re: Apache configuration
It's funny to see that the SetEnv command works well in another part of httpd.conf:
...
...
Alias /gest/ "/home/web/gest/"
SetEnv PYTHONPATH /home/web/gest/site-packages:/home/web/gest/app-packages:/home/web/gest/applications
SetEnv ORACLE_HOME /home/oracleclient/oracle_home
Order allow,deny
Allow from all
Options +ExecCGI
...
In this aliased directory the env variables are visible by the scripts.
But not in the user web directories.
tx
Claudio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 12:37 AM
тАО05-27-2003 12:37 AM
Re: Apache configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 01:12 AM
тАО05-27-2003 01:12 AM
Re: Apache configuration
of the environment variable ORACLE_HOME that my cgi scripts
need to see. It has no interest for apache.
The only difference I see between my two examples is that
the cgi scripts running in the user web directories (first
example) will the started by apache through the command
suexec, which lets apache to change the user that owns the script's process.
Nevertheless this, all the other apache-specific environment
variables are still available to the cgi scripts, but not
the variables I defined.
tx again
Claudio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 04:12 AM
тАО05-27-2003 04:12 AM
Re: Apache configuration
They set variables in the cgi script itself. If they need to be configured differently on different occaisions, the cgi script reads a data file and sets environment variables accordingly.
If all you are doing is setting ORACLE_HOME, go ahead and hard code it into the script, thats all you're trying to do with the httpd.conf anyway.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 04:36 AM
тАО05-27-2003 04:36 AM
Re: Apache configuration
tx
Claudio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 08:53 AM
тАО05-27-2003 08:53 AM
Re: Apache configuration
I would try and move the directive to a different part of the file.
If you have virtual hosting setup to handle more than one IP/website, then move the code there.
Then
service httpd restart
Run a test script and see if the variable is set.
If you are running perl in the cgi script there is a directive for bringing environment variables into a normal variable. It could be geting set, but you might need to pull it in.
$variable=$ENV{'CONTENT_LENGTH'};
$oracle_home=$ENV{'ORACLE_HOME'};
Mabye the variable IS being set, just the script isn't set up to read it in and use it.
This code with a print statement would be a very good test as you play with apache.
Hope this helps.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 11:34 AM
тАО05-27-2003 11:34 AM
Re: Apache configuration
...
or
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 12:18 AM
тАО05-28-2003 12:18 AM
Re: Apache configuration
in user homes, not the literal '/home/*/public_html' (I taken
it from a commented example in apache's original httpd.conf file).
the match string is correct because the directive 'Options +ExecCGI'
works. However, the regular expression string doesn't change
a thing. But I think it is a better way to say the same thing :-)
Thanks anyway!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 05:39 PM
тАО05-28-2003 05:39 PM
Solutionhttp://httpd.apache.org/docs/env.html
When suexec is used to launch CGI scripts, the environment will be cleaned down to a set of safe variables before CGI scripts are launched. The list of safe variables is defined at compile-time in suexec.c.
I suspect the suexec is your problem. You can modify the suexec.c file to allow ORACLE_HOME and re-compile apache, or launch your CGIs without using suexec.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 10:19 PM
тАО05-28-2003 10:19 PM