Home>Article>Operation and Maintenance> How to hide apache version information
Background introduction:
If we enable the Apache service, then Others can find your Apache version number through F12 and use some known vulnerabilities or zero-day vulnerabilities to attack, which is very dangerous. So in order to reduce a little bit - even a little bit of risk, we'd better choose to hide Apache version information.
(Related recommendations:apache)
The specific method is as follows:
Edit Apache’s configuration file
vim /etc/httpd/conf/httpd.conf
Add this line:
ServerTokens prod
Then restart the service
systemctl restart httpd
Refresh the web page and find that the version information of Apache has been Hidden
Of course, you can also modify the source code to change Apache to nginx. In this way, when checking your version information, it will mistakenly think that you are using nginx, giving attackers extra Add a little more difficulty.
As for how to change the waistcoat, I searched for several tutorials on the Internet without success. If you have any friends, please leave a message in the comment area or message me privately to communicate.
The above is the detailed content of How to hide apache version information. For more information, please follow other related articles on the PHP Chinese website!