修改apache版本信息
在安装之前,编辑原文件httpd-2.2.31/include/ap_release.h文件如下:
40 #define AP_SERVER_BASEVENDOR "IIS"
41 #define AP_SERVER_BASEPROJECT "IIS HTTP Server"
42 #define AP_SERVER_BASEPRODUCT "IIS"
43
44 #define AP_SERVER_MAJORVERSION_NUMBER 7
45 #define AP_SERVER_MINORVERSION_NUMBER 0
46 #define AP_SERVER_PATCHLEVEL_NUMBER 0
47 #define AP_SERVER_DEVBUILD_BOOLEAN 0
编辑httpd-2.2.31/os/unix/os.h文件,修改如下:
35 #define PLATFORM "win64"
隐藏apache版本信息
vi /application/apache/conf/extra/httpd-default.conf 修改以下内容:
ServerSignature off
ServerTokens prod
vi /application/apache/conf/httpd.conf 去掉下面的#注释
Include conf/extra/httpd-default.conf
检查语法:/application/apache/bin/apachectl -t
平滑重启:/application/apache/bin/apachectl graceful
查看效果:curl -I 192.168.31.36
相关文章
- 01-31apache安全之修改或隐藏版本信息