北京时间:
 
 
 首页 
 
 
 
 
 
 
 洛杉矶论坛 
   
洛杉矶华人论坛 |  搜索  |  注册  |  登陆  |  FAQ 
 
 
How to Change Apache's Sever:Apache header

 
发表新帖   回复帖子    洛杉矶华人论坛 首页 -> 技术交流
阅读上一个主题 :: 阅读下一个主题  
留言
How to Change Apache's Sever:Apache header  引用并回复
 
发布人: Mrs LA   发布于: 2008/02/01, 6:57 pm

Not like IIS, you can completely remove Server header from response. The simply way is to minize the header's output by changing two propery in httpd.conf

ServerSignature Off
ServerTokens Prod

ServerTokens tell apache to show only Apache not dispose other information

In Apache 2.2's httpd.conf, you may not able to find these two properties, but you can paste them to the end of the configuration file

The final output will like:
HTTP/1.1 200 OK
Date: Sat, 02 Feb 2008 02:51:40 GMT
Server: Apache
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Sat, 02 Feb 2008 02:51:41 GMT
Cache-Control: post-check=0, pre-check=0
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 6536
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

返回页首
阅览成员资料 (Profile) 发送私人留言 (PM)
从以前的帖子开始显示:   
点评这篇文章
 
1 2 3 4 5
1个人参与评分
发表新帖   回复帖子    洛杉矶华人论坛 首页 -> 技术交流 论坛时间为 PST (美国/加拿大)
1页/共1   
转跳到:  


 
Copyright 2006-2008 www.ChineseInLA.com All rights reserved.