北极星光 发表于 2015-11-19 12:42:54

修改源码去除Squid版本信息

1.编辑/root/soft/squid-2.6.STABLE22/src/errorpage.c 文件在以下地方修改

} error_hard_text[] = {
    {
      ERR_SQUID_SIGNATURE,
            &quot;/n<BR clear=/&quot;all/&quot;>/n&quot;
            &quot;<HR noshade size=/&quot;1px/&quot;>/n&quot;
            &quot;<ADDRESS>/n&quot;
            &quot;Generated %T by %h (techcache)/n&quot;            ;将%s修改为techcache即可
         
            &quot;</ADDRESS>/n&quot;
            &quot;</BODY></HTML>/n&quot;
    },

2.然后编译、安装squid即可

3.修改后的出错信息为:

ERROR
The requested URL could not be retrieved
--------------------------------------------------------------------------------
While trying to retrieve the URL: http://192.168.30.29/
The following error was encountered:
Access Denied.
Access controlconfiguration prevents your request from being allowed at this time.Please contact your service provider if you feel this is incorrect.
Your cache administrator is webmaster. test5.com

--------------------------------------------------------------------------------
Generated Tue, 28 Jul 2009 16:31:11 GMT by test5.com (techcache)             版权声明:本文为博主原创文章,未经博主允许不得转载。
页: [1]
查看完整版本: 修改源码去除Squid版本信息