0

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
3
  • 1
    What exactly is not working? Your question is completely unclear right now. May 7, 2013 at 21:03
  • The mod_headers module can set the Headers header via %t to be 1970+ format, instead of the Date: Tue, 27 Mar 2007 19:42:41 +0000
    – CMag
    May 8, 2013 at 15:36
  • Put here dump of HTTP request to your server. And give us server logs May 9, 2013 at 10:44

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.