0

I have a web server, running using Apache/2.2.22 on Debian/7.8.

I would like to disable the signature that is added at the end of error pages:

Not Found
The requested URL /sdffds.html was not found on this server.
_____________________________
Apache/2.2.22 (Debian) Server at xxx Port 80  <-- this

I should be able to do this by editing the /etc/apache2/conf.d/security file. I did so by uncommenting ServerSignature Off (and commenting ServerSignature On). However, after reloading/restarting apache2, this doesn't work.

I checked apache2.conf, the instruction Include conf.d/ is here. This means either apache2 is not looking at conf.d files properly, or I have made a mistake editing conf.d/security.

To be sure, I edited apache2.conf and put Include conf.d/security, it works.

Why is apache2 not properly looking to conf.d/ files?

2

2 Answers 2

1

I am pretty sure Apache will only pick up files that end in ".conf" from the conf.d directory.

Try changing ..conf.d/security to ..conf.d/security.conf

Alternatively you can add "ServerSignature Off" to the primary configuration file and it should work just fine.

0

Actually Include conf.d/ is loading all files (in alphabetical order i think) irrespective of extension from conf.d/ . I was also facing the same issue after setting ServerSignature Off in security file and the reason was I have backup of original security file inside conf.d/ called security.bak (which contains ServerSignature On). So you have to make sure that there is no other file present in conf.d/ which can cause conflict. Because in my case, security.bak was loading after security that's why it was overriding my settings. Solution provided by Jacob Margason will solve your issue too because adding ServerSignature Off at the end of apache2.conf overrides everything

You must log in to answer this question.

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