httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A D <>
Subject [users@httpd] environment variables manipulation in httpd.conf
Date Tue, 14 Dec 2010 14:28:58 GMT



I've just recompiled a apache 2.2.17 on linux with all
modules in shared. I'm trying to add headers containing apache
"environment variables" like SERVER_NAME, HTTP_USER_AGENT with

I always get null in my headers. 



The response from server contains the header but I'm
unable to put inside any env variables

The only thing that works is the %D and %t for time.


I'm probably missing something but I can not figure what
I'm doing wrong. 

Here is an extract of th httpd.conf



LoadModule env_module modules/

LoadModule headers_module modules/

LoadModule ident_module modules/

LoadModule unique_id_module modules/

LoadModule setenvif_module modules/

LoadModule rewrite_module modules/


ServerName Server


Listen 8080


Header add TOTO "%D %t %{SERVER_NAME}e"


NameVirtualHost *:8080

 <VirtualHost *:8080>

 DocumentRoot /usr/local/apache/htdocs"

 ServerName Server

 Header add TUTU "%D 
%t  %{SERVER_NAME}e"




With this conf I get TUTU D=xxxxxx t=ttttttt null It is
the same with every variables. Same with headers TOTO. It is like the environment variables
are not available outside a cgi programm

Thanks in advance


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