Disable ServerSignature on Apache or Nginx

How To disable Server Signature on Apache and Nginx HTTP-Server

There are numerous ways websites can be exposed to security threats. Information in the server signature is an increased risk for systems and can be used against them.

The server signature provides important information about the server with the extensions and the operating system. For an Apache server on Debian GNU/Linux, the Apache version number and operating system information is displayed in the HTTP server header signature.

This information displayed in the HTTP server header at line 10 and provides information about the web server version number and the PHP version, the OpenSSL version for Transport Layer Security and the operating system.

Signatures can contain sensitive information about the software versions running on the web server. If a page is not found on the server, the server sends the client an error page and the page appears in the browser, Not Found.

Browser Seite with HTTP-Statuscode 404 and Serversignature

A dead link is returned to the browser with the HTTP status code 404, and further information about the web server and version used are also disclosed.

It is recommended that the server signature be deactivated if the system is to be protected from open threats. This tutorial shows how to disable the server signature.

Disable Apache HTTP-Serversignatur on Debian GNU/Linux

Under Debian 10 (Buster) the server signature is configured in the file security.conf.

The default setting on Debian 10 (Buster) also on Ubuntu for ServerSignature is On and ServerTokens is Full. These can be deactivated as follows.

Apply change the Apache web server configuration.

Disable Apache HTTP Serversignatur on CentOS GNU/Linux

On CentOS (RedHat) the server signature is changed in the Apache configuration file httpd.conf.

Apply changes of the HTTP server signature for CentOS.

After disable the server signature, it is no longer displayed in the HTTP server header output. The modification can be checked using wget or here.

The deactivation of the server signature can also be achieved with .htaccess, this is created in the Docroot if it does not already exist.

Disable PHP-Version HTTP Server Header

The output of the PHP version number is deactivated in Debian 10 (Buster) as follows in the file php.ini.

On CentOS (RedHat) the PHP version header is done in php.ini under the following path.

Apache HTTP-Response-Header

The Apache ServerTokens directive has the following possible values that are sent to clients when the specific value is set.

This setting applies to the entire server and cannot be enabled or disabled on a virtual host basis.

Nginx HTTP Server_tokens OFF

The file nginx.conf must be modify for Nginx web server.

Apply changes to disable the Nginx server signature.

Leave a Reply

Your email address will not be published. Required fields are marked *