XAMPP或phpstudy环境下隐藏apache和php版本

当网站返回默认403、404提示时,会返回apache和php的版本系统信息,鉴于安全,我们需要隐藏这些信息。一般返回错误如下:

You don't have permission to access / onthis server.

Apache/2.4.23 (Win64) PHP/5.6.25 Server at123.207.226.239 Port 80

1、修改httpd.conf
先到apache\conf\下找到httpd.conf,查找httpd-default.conf去掉前面的 #
2、修改httpd-default.conf
到\apache\conf\extra打开httpd-default.conf
找到

ServerSignature On
ServerTokens Full

改为

ServerSignature Off
ServerTokens Prod 

你如果是linux系统中在httpd.conf中修改。

分享到:

用微信扫一扫,分享给朋友


发布日期:

所属分类: SEO 网站运营 标签: