Changing the http header info to hide server info

前端 未结 1 2038
执念已碎
执念已碎 2021-01-02 23:45

My question is whether I can omit my server info from being sent in the http header using php? I know by itself it is not dangerous, but humor me. If I wanted to omit that i

1条回答
  •  别那么骄傲
    2021-01-03 00:25

    I don't know if using PHP to do this is the right approach. Is the server running Apache? If so, you can add the following options to your config file to hide server info:

    ServerTokens ProductOnly
    ServerSignature Off
    

    To hide PHP info, edit your php.ini and add the line:

    expose_php Off
    

    Or, if this option already exists, change from On to Off.

    Reference: http://www.debianadmin.com/apache-tipshide-apache-information-php-software-version.html

    0 讨论(0)
提交回复
热议问题