[Sysadmins] Apache environment variables question

John G. Moylan john at nuatech.net
Wed Feb 10 20:37:54 GMT 2010


All the standard CGI variables are exposed to Apache

 http://httpd.apache.org/docs/2.2/env.html

http://hoohoo.ncsa.illinois.edu/cgi/env.html

This kind of thing should work

Header set MyRequestVar_a %{HTTP_MYREQUESTVAR_B}e

but I have not tried it.

J


On 10 February 2010 17:58, Paschal Nee <pnee at toombeola.com> wrote:
> (Cross post from ILUG)
>
> Hi,
>
> I have a farm of HTTP servers.  Using Apache I'd like to add a header
> to each response that will identify the server that serviced the
> request.
>
> I've tried
>   Header set myHeader "%{SERVER_NAME}e"
> or
>   Header set myHeader "%{SERVER_ADDR}e"
>
> But all I get in the response is
>
> myHeader: (null)
>
> I guess the SERVER_NAME and SERVER_ADDR are environment variables set by CGI.
>
> Does anybody have a list of variables set by Apache?  Any idea how to
> do the above.
>
> Thanks,
> Paschal.
>
> _______________________________________________
> Sysadmins mailing list
> Sysadmins at lists.stdlib.net
> http://lists.stdlib.net/mailman/listinfo/sysadmins
>



-- 
_____________
John G. Moylan



More information about the Sysadmins mailing list