Re: [users@httpd] Using environment variable in httpd.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As far as I know, it's an undocumented "feature". But, in my experience, it does actually work quite well. While I vaguely recall a note on the development list questioning whether or not this should be removed, I would love to see this become a full-fledged documented feature as it is very useful in situations such as yours.

In your httpd.conf file you can use environment variables like this:
${varname}

In our environment, we use environment variables for quite a few things:
ServerRoot
Port
DocumentRoot
module paths - both bundled and custom modules
User & group  (different users in development vs. production)
path to piped log program
log file path
etc...

Hope this helps.
Tom



Khai Doan wrote:
I am a mod_perl programmer, and I also manage my company web server. We are growing and constantly adding new features to our products. I find myself making change to the httpd.conf very frequent. Sometimes, I change httpd.conf on the development server, and later forget to apply the change to httpd.conf on staging server, and production servers. I wish to have the httpd.conf in my company cvs repository and get pushed out along with the rest of the application code. Unfortunately quite a few things in httpd.conf stand in the way, such as hardcoded paths, and port numbers. (We are in an environment where all developers have to develop on one development server, and each developer is assigned a port number, and run a separate apache process listening on that port.) I also want other developers to be able to check in changes to the httpd.conf file. If I set up environment variables to hold these hardcoded paths, and port numbers, can I use these environment variables in httpd.conf? If I am to write a module in C to handle this, where can I start? What book do you recommend? Khai --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux