Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

log specific response header for unset header

Post new topic   Reply to topic    Apache Forum Index -> Apache

View previous topic :: View next topic  
Author Message

Joined: 12 Jan 2018
Posts: 1
Location: Germany, Lutzhorn

PostPosted: Fri 12 Jan '18 13:59    Post subject: log specific response header for unset header Reply with quote


I m using Apache 2.4.6 on RedHat Linux, which is in front of a tomcat Application Server via ProxyPass and ProxyPassReverse configuration.

Tomcat is returning a specific header which I would like to log to my accesslog using LogFormat:
LogFormat "%h,USER=%u,%t,METHOD=%m,URI=%U%q,RESPONSE=%>s,SIZE=%B,DURATION=%D,REFERER=%{Referer}i,USERAGENT=%{User-Agent}i,meinHeader=%{X-Specific-Header}ohist" combined

In addition X-Specific-Header must be removed by apache cause information must not be shown in apache response to client. (Header unset X-Specific-Header)

Unfortuently, it seems that unset header process is being done BEFORE access log is written, cause access log always shows an empty value for X-Specific-Header

Any idea how I might be able to log AND to remove Response Header ?

Thanks a lot for your help in advance

Back to top

Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1