1

The header directive says it can be set for the server config context but setting it outside any virtual hosts has no effect. I would like to globally unset a header across all virtual hosts.

I have placed the "Header unset" directive in httpd.conf after setting up a conf.d/header.conf file failed to work. But no luck. I am sure the directive is not being overridden in the hosts config namespace.

thanks

1
  • 1
    To ensure that it's working as you expect have you tried putting it in a vhost context ?
    – user9517
    May 3, 2014 at 6:42

1 Answer 1

1

Ok. So the header is being set by Drupal in code. I had to add the "always" condition to the Apache directive to get the server setting to override the header.

See the discussion on the "internal table of response headers" in the Apache docs here

To make it work you need the following in you server config context in the Apache config files:

                         Header always unset X-Generator

It appears that this was the default in some versions of apache and hence may be the reason that many google results do not mention it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .