基于安全需求可能在编译web服务器之前需要修改服务器默认名称:
0 1 2 3 4 5 6 7 8 9 |
[root@squid byrd]# curl -I tieba.baidu.com HTTP/1.1 302 Moved Temporarily Date: Wed, 25 Jun 2014 02:07:42 GMT Content-Type: text/html Connection: Keep-Alive Location: Set-Cookie: BAIDUID=97D989CD1B0D4215D1433AD80C98FE59:FG=1; expires=Thu, 25-Jun-15 02:07:42 GMT; max-age=31536000; path=/; domain=.baidu.com; version=1 P3P: CP=" OTI DSP COR IVA OUR IND COM " tracecode: 04623603300992500746062510 Server: Apache |
此处可以看到百度贴吧可能使用的是apache作为web服务。
基于安全修改默认nginx服务名称:
0 |
[root@root nginx-1.6.2]# vim src/http/ngx_http_header_filter_module.c #大概49、50行 |
修改为:
0 1 |
static char ngx_http_server_string[] = "Server: Apache" CRLF; static char ngx_http_server_full_string[] = "Server: Apache" CRLF; |
申明:本文由BYRD原创,未经许可禁止转载! SourceByrd's Weblog-https://note.t4x.org/basic/changes-server-name/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!