httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian V Hughes <bria...@Dartmouth.EDU>
Subject [users@httpd] Question about RequestHeader and Apache's use of Environment Variables
Date Thu, 01 Jul 2004 16:51:58 GMT

Good day, all. I'm a brand new member of this list and I joined 
primarily so I could post this message. I've looked all over the web 
(via Goggle), all through the Apache 2.0 docs, as well as the archives 
of this mailing list and the O'Reilly Apache books, and I've come to 
the unfortunate conclusion that what I want to do simply can't be done 
with Apache 2.0 (I'm currently running 2.0.48, but I don't see any 
chances in the the release notes for 2.0.50).

So, with that background, here's my set-up and my problem:

I'm running Apache 2.0.48, under Mac OS X. I've got multiple domains, 
mapped to a single IP address, and I'm using NamedVirtualHost to handle 
it all. The primary reason for this set-up is because I wish to use 
Apache as the gateway/proxy for an embedded web server running on a 
different port. I was able to find, at the site, a great 
write-up on using ProxyPass and ProxyPassReverse with <VirtualHost> 
settings, so getting that part working was pretty easy.

No, on to my problem: My embedded web server (UserLand Frontier, for 
those that might care), has a need to know the IP address of the client 
and the name of the host, both of which are very easy to obtain from 
the HTTP request headers. However, I also need to be able to access the 
REMOTE_PORT of the client, in order to make an authentication call back 
to the client machine. I found mod_headers and the RequestHeader 
directive, and found the syntax for including an environment variable. 
But, much to my surprise, I find that not only will RequestHeader not 
include the value of any environment variables, including things like 
HTTP_USER_AGENT, but that Apache doesn't even makethe environment 
variables available for modules to use. Access appears to be module 
specific (i.e. mod_cgi and mod_rewrite (as of 2.0.49) can both access 
REMOTE_PORT), rather than system wide.

I guess my question, now that I've spent all this time explaining what 
I've learned, is what are the chances that mod_headers will be modified 
to allow access to, and thus inclusion of, environment variable values 
for things like passing those values along to proxy requests? It would 
appear to me that RemoteHeader is tailor made to provide this 
functionality if it could simply gain access to the values. Is there 
some design reason, or perhaps a security reason that I'm not 
understanding, that would prevent this?

Thanks for any insight/assistance, and for reading this far. ;->

Brian V. Hughes
Associate Director for Web Operations
Computing Technical Services
Dartmouth College

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message