I am using Apache on Linux(RHEL5) and Apache version is 2.2.4. I am running a fastCGI application using Apache and I want to export a variable to this application. I have already tried SetEnv directive in the httpd.conf file but it doesn't seem to work,
Following is in the httpd.conf SetEnv MALLOC_CHECK_=3
I have also tried to set it using envvars file but still it's not exported in the application. Following is in the bin/envvars file
I would like to mention that I also have the following in my httpd.conf file
<IfModule !mpm_netware_module> # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User http Group http </IfModule>
and I guess that's why it's not being exported in the application i.e Apache is being initially run as root and then changes user to http so basically I have to export this variable to application as an http user. But how?
I start Apache server using:- ./bin/apachectl start (as root)
Is there a way out? I don't want to modify the code of application and use setenv system call to set an environment variable. Your help would be appreciated. Thanks for your patience.