Hide Server Info

Source: Internet
Author: User

<? PHP /*
Wamp64\bin\apache\apache2.4.18\conf
httpd.conf



server:apache/2.4.18 (Win64) php/5.6.19x-powered-by:php/5.6.19 */

<? PHP Header (' x-powered-by:asp.net '); /* wamp64\bin\apache\apache2.4.18\confhttpd.conf serversignature  on Servertokens full server:apache/2.4.18 (Win64) php/5.6.19x-powered-by:asp.net* /
<? PHP Header (' Server:ASP.NET '); Header (' x-powered-by:asp.net '); /* wamp64\bin\apache\apache2.4.18\confhttpd.conf serversignature  on Servertokens full server:apache/2.4.18 (Win64) php/5.6.19x-powered-by:asp.net* /

<? PHP /* wamp64\bin\apache\apache2.4.18\confhttpd.conf serversignature Off  Servertokens full server:apache/2.4.18 (Win64) php/5.6.19x-powered-by:asp.net* /
<? PHP /* wamp64\bin\apache\apache2.4.18\confhttpd.conf serversignature Off servertokens productonly Server: apachex-powered-by:php/5.6.19* *

<?  Header(' x-powered-by:asp.net '); /* wamp64\bin\apache\apache2.4.18\confhttpd.conf serversignature Off servertokens productonly Server: Apachex-powered-by:asp.net* *
<?  Header(' X-powered-by:yuanjiangw '); /* wamp64\bin\apache\apache2.4.18\confhttpd.conf serversignature Off servertokens productonly Server: APACHEX-POWERED-BY:YUANJIANGW* *

Https://httpd.apache.org/docs/2.4/mod/core.html#serversignature

ServersignatureDirective
Description: Configures the footer on server-generated documents
Syntax: ServerSignature On|Off|EMail
Default: ServerSignature Off
Context: Server config, virtual host, directory,. htaccess
Override: All
Status: Core
Module: Core

TheServerSignaturedirective allows the configuration of a trailing footer line under server-generated documents (Error messages, mod_proxy FTP directory listings, mod_info output, ...). The reason why are would want to enable such a footer line are that in a chain of proxies, the user often have no possibilit Y to tell which of the chained servers actually produced a returned error message.

TheOffsetting, which is the default, suppresses the footer line (and was therefore compatible with the behavior of Apache-1.2 and below). TheOnSetting simply adds a line with the server version number and servername  of the serving virtual host, and The  EMail  setting additionally creates a "mailto:" Reference to The serveradmin  of the referenced document.

After version 2.0.44, the details of the server version number presented is controlled by the ServerTokens directive.

See Also
    • ServerTokens
ServertokensDirective
Description: configures The  http response header
Syntax: servertokens major| minor| min[imal]| prod[uctonly]| os| Full
Default: servertokens full
Context: server config
Status: core
Module: Core

This directive controls whether Server response Header field which are sent back to clients includes a description o f the generic Os-type of the server as well as information about compiled-in modules.

ServerTokens Full (or not specified)
Server sends ( e.g.): Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2
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.4
ServerTokens Min[imal]
Server sends ( e.g.): Server: Apache/2.4.2
ServerTokens OS
Server sends ( e.g.): Server: Apache/2.4.2 (Unix)

This setting applies to the entire server, and cannot is enabled or disabled on a virtualhost-by-virtualhost basis.

After version 2.0.44, this directive also controls the information presented by the ServerSignature directive.

SettingTo less than are not ServerTokens minimal recommended because it makes it more difficult to debug interoperational Problems. Also Note that disabling the Server:header does nothing at all to make your Server more secure. The idea of "security through obscurity" was a myth and leads to a false sense of safety. See Also
    • ServerSignature
<?  Header(' X-powered-by:yuanjiangw '); /* wamp64\bin\apache\apache2.4.18\confhttpd.conf serversignature on Servertokens productonly Server: APACHEX-POWERED-BY:YUANJIANGW* *
<?  Header(' X-powered-by:yuanjiangw_mail '); /* wamp64\bin\apache\apache2.4.18\confhttpd.conf serversignature EMail servertokens productonly Server: Apachex-powered-by:yuanjiangw_mail* *

Ask:

0-serversignature role?

Hide Server Info

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.