Re: [EMAIL PROTECTED] Using environment variable in httpd.conf
looks like you've gotten additional very useful info. To answer your earlier questions, we're currently running 2.0.54 on AIX 5.2 We're also using a heavily modified apachectl script which is reads delimited instance parameters from records in a table file (simple grep/awk). This allows us to associate a profile with each instance which can export environment variables as needed by that respective instance. Tom [EMAIL PROTECTED] wrote: Of course Joshua. But it is nice to know that th functionality is there if it's needed. Keith In theory, theory and practice are the same; In practice they are not. On Thu, 19 Jan 2006, Joshua Slive wrote: To: users@httpd.apache.org From: Joshua Slive [EMAIL PROTECTED] Subject: Re: [EMAIL PROTECTED] Using environment variable in httpd.conf If you are already using mod_perl, then this is a legitimate possibility. But if you aren't using mod_perl, adding it would be way overkill for this problem. Joshua. - 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: [EMAIL PROTECTED] from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: [EMAIL PROTECTED] from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] Using environment variable in httpd.conf
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: [EMAIL PROTECTED] from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: [EMAIL PROTECTED] from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] Configuring apache as a gateway for another domain on another server
Maybe a combination of mod_proxy and mod_rewrite is what you're looking for. Something like this: RewriteCond %{HTTP_HOST} www.d1.com [NC] RewriteRule ^(.*) http://m1/$1 [P,L] RewriteCond %{HTTP_HOST} www.d2.com [NC] RewriteRule ^(.*) http://m2/$1 [P,L] I don't have a lot of experience with mod_rewrite, so the syntax might not be quite right, but perhaps someone else can follow up with any corrections. Tom Michael D. Berger wrote: If nothing else is suggested, I think that this could be done with NetFilter (http://www.netfilter.org/). Hopefully, something else will be suggested. Mike. -- Michael D. Berger [EMAIL PROTECTED] -Original Message- From: Bart Heinsius [mailto:[EMAIL PROTECTED] Sent: Sunday, November 06, 2005 9:14 AM To: users@httpd.apache.org Subject: Re: [EMAIL PROTECTED] Configuring apache as a gateway for another domain on another server From what I read in the documentation, mod_proxy works for routing requests for www.d1.com/myapp1 and www.d1.com/myapp2 (notice that both url's are in the d1.com domain) to be served by different servers on the internal network. What I want is to route requests for www.d1.com and www.d2.com to different servers (notice the difference in domain names), where www.d1.com and www.d2.com have the same ip address in the outside world dns. With Virtual Hosts I can manage different domain names to be served from different directories. With mod_proxy I can manage different url's on the same domain to be served by different servers. I need a combination of both: different domain names being served by different servers. Thanks, Bart. On 11/6/05, Nick Kew [EMAIL PROTECTED] wrote: On Sunday 06 November 2005 12:10, Bart Heinsius wrote: Hi, I have two servers on my internal network with apache on them, lets say m1 and m2. I want to host two domains on my network, lets say www.d1.com and www.d2.com. The router routes all external http requests to server m1. External requests for www.d1.com should be processed by apache on server m1. External requests for www.d2.com should be processed by apache on server m2. How would I do this? I googled around and looked on apache.org which directed met to mod_proxy but I don't think that works in this situation. mod_proxy is exactly what you need. see also http://www.apacheweek.com/features/reverseproxies -- Nick Kew - 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: [EMAIL PROTECTED] from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: [EMAIL PROTECTED] from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: [EMAIL PROTECTED] from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: [EMAIL PROTECTED] from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]