Skip to Content

Nginx - hide server version and name in Server header and error pages

On Debian you have to install nginx-extras package (because it have built in headers_more module). Then you need two options (best in global configuration /etc/nginx/nginx.conf file, http part):

server_tokens off;
more_set_headers 'Server: BadAss';

And it’s good to setup non standard error pages on every site (500 and 404 at minimum):

error_page   403 404;
error_page   502 503 504   /500.html;
comments powered by Disqus