We know that by default, Apache will display the version number and operating system version, and even display what kind of Apache modules are installed on the server. This is very unsafe.
So how do we hide the apache version number?
You only need to modify the ServerSignature parameter in the apache2 configuration file.
(Recommended tutorial: apache tutorial)
The specific method is as follows:
New version of apache2 related configuration files
/etc/apache2/conf-enabled #被使用文件的软连接 sudo vim security.conf #找到 ServerSignature #将后面的参数设置为 ServerSignature Off #然后找到ServerTokens #修改为 ServerTokens Prod
Just restart apache2.
The above is the detailed content of How to hide apache version number. For more information, please follow other related articles on the PHP Chinese website!