Anonymous apache & PHP
Like to be conspicuous? Like me.
Then use the ServerTokens and expose_php options. On a production web server I generally set these two options, pretty much stops and zero day hack attempts and other such nonsense
ServerTokens in httpd.conf
This directive controls whether Server response header field which is sent back to clients includes a description of the generic OS-type of the server as well as information about compiled-in modules.
ServerTokens Prod[uctOnly]
Server sends (e.g.): Server: Apache
ServerTokens Major
Server sends (e.g.): Server: Apache/2
ServerTokens Minor
Server sends (e.g.): Server: Apache/2.0
ServerTokens Min[imal]
Server sends (e.g.): Server: Apache/2.0.41
ServerTokens OS
Server sends (e.g.): Server: Apache/2.0.41 (Unix)
ServerTokens Full (or not specified)
Server sends (e.g.): Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.2
I set ServerTokens Prod. I give away nothing but the server name.
expose_php in php.ini
Decides whether PHP may expose the fact that it is installed on the server (e.g. by adding its signature to the Web server header). It is no security threat in any way, but it makes it possible to determine whether you use PHP on your server or not.
This option is a boolean. Basically, it is a On or Off option. So I set expose_php = Off
To an onlooker, your server doesn't even have PHP installed. Expect for maybe for .php page extensions. Time for MultiViews?
Related posts:
- Anonymous apache & PHP for cPanel
So I've started playing with cPanel/WHM recently. I've got to say it does make my... - Ridiculously simple NTLM Authentication for Apache (Ubuntu)
We all know Ubuntu makes things amazingly simple. This is the best I've found so... - Block Countries in Apache
Assuming you have mod_geoip installed in apache we can block certain countries in 6 lines... - Apache, JungleDisk and Port 80
I was tearing what little hair I have trying to solve a very strange bug... - Installing mod_evasive on cPanel and/or Apache
This guide details how to install mod_evasive on cPanel to help protect against DDOS attacks,...