Home>Article>Operation and Maintenance> How to hide apache version information

How to hide apache version information

王林
王林 forward
2020-11-25 16:44:57 4960browse

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)

How to hide apache version information

The specific method is as follows:

Edit Apache’s configuration file

vim /etc/httpd/conf/httpd.conf

Add this line:

ServerTokens prod

How to hide apache version information
Then restart the service

systemctl restart httpd

How to hide apache version information
Refresh the web page and find that the version information of Apache has been Hidden
How to hide apache version information

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete