With Nginx I've always used this for the first server block to defeat host header attacks, taken from the h5bp boilerplate server configs[0]:
server {
listen 80 default_server;
return 444;
}
Is something like this necessary for Apache as well? If yes, what are others using? (ignoring the non-standard but effective 444 return code)