When serving as a reverse proxy, apache adds x-submitted headers as referred to here.


During my configuration I've set up server A like a forward proxy. There's a guide such as this:

RewriteRule proxy:(.*example.com)/(.*) $1.mysecondserver.com/$2 [P]

This rule allows the server request the resource in one of my other servers.

Around the second server (origin) I've got a virtual host container for that resource and the other rewrite rule such as this:

RewriteRule some-regex some-url [P]

It might not appear to create sense such as this but there's lots of other things happening which i omitted because it is not area of the problem.

However that final request has these headers:

[X-Forwarded-For] => ip of 1st server
[X-Forwarded-Host] => example.myseconserver.com
[X-Forwarded-Server] => example.com

I would like individuals headers gone.

I appear to become not able to unset all of them with mod_headers. I'm able to increase the records towards the, but I am unable to take them off

Any Ideas?