Hey guys, I'm trying to remove any infos relative to apache, so I added to my httpd.conf in /etc/apache2 these two lines:

ServerSignature Off
ServerTokens Prod

then I restart the server, but infos still show up. So I decided to edit directly apache2.conf at the whole bottom, and added these two lines again, and it worked :o

Do you have an idea of what would cause this? Something in apach2.conf overwriting my rules after it includes the httpd.conf?

thanks for your time!


Unfortunately, the default apache2.conf includes everything inside of /etc/apache2/conf.d. If you look inside /etc/apache2/conf.d/security, you're likely to see the following:

#ServerSignature Off
ServerSignature On

Because of the order that files are included (I believe its alphabetically by globbing), this means that the values in security are overriding the ones in httpd.conf. Simply make the change in security, or comment it out and put it in httpd.conf.

  • Makes sense, thanks! it's just weird that if httpd.conf should be the user's config, it should also be included at the end :o, weird...
    – allaire
    Apr 1 '11 at 13:29
  • Well, the idea is that you should never be editing apache2.conf directly. Its the same with init scripts... for example, you should NEVER be editing /etc/init.d/apache2 directly, you should be editing /etc/sysconfig/apache2, which would then be sourced by the init file.
    – Andrew M.
    Apr 1 '11 at 13:30
  • ok, but it's safe to edit anything in /etc/apache2/conf.d ?
    – allaire
    Apr 1 '11 at 13:32
  • Sure, or at least--you'll just be adding onto the existing apache2.conf.
    – Andrew M.
    Apr 1 '11 at 14:31

Because you have a line ServerSignature On in any of the included conf files coming after the line include httpd.conf in apache2.conf, which overwrites your statements.


look in


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.