Apache mod_headers custom header

apache-2.2

Folks,
Trying to add a custom header with mod_headers. Need to set the 'Date' Header for AWS S3 via mod_headers. I am trying to do the following in the apache config:

RequestHeader add Authorization "AWS AWSAccessKeyId:Signature"
RequestHeader set Date "%{DATE_GMT}e"

Its not working , and im trying to find out why. I've setup logging (for testing) as

LogFormat "%h %l %u %t \"%r\" %>s %b %{Date}i %{Authorization}i" common

Any help would be greatly appreciated! At the end of the day, I would like to have a Date: Header added in the following format:

Date: Tue, 27 Mar 2007 19:42:41 +0000

Best Answer

RequestHeader directives adds Headers to a request meant to be proxied to another server.

You want to use the directive Header add (...)

Just change RequestHeader by Header and see how it goes.