• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            牽著老婆滿街逛

            嚴以律己,寬以待人. 三思而后行.
            GMail/GTalk: yanglinbo#google.com;
            MSN/Email: tx7do#yahoo.com.cn;
            QQ: 3 0 3 3 9 6 9 2 0 .

            windows下使用curl獲取響應頭信息,以及服務器隱藏響應頭信息

            轉載自:http://www.apachepoi.com/dev/084561.html

            獲取頭信息的代碼:

            curl -I www.baidu.com

             

            頭信息內容如下:

             

            下面是轉載的一篇文章:

             Lighttpd、Nginx 、Apache 隱藏響應頭信息的Server信息和版本信息

            web server避免 一些不必要的麻煩,可以把apache和php的版本信息不顯示

            隱藏 Apache 版本信息

            /etc/apache2/apache2.conf 或 /etc/httpd/conf/httpd.conf

            ServerTokens ProductOnly
            ServerSignature Off

            重啟 apache
            現在 http 頭里面只看到:
            Server: Apache

            =====================

            nginx

             

            #vi nginx.conf
            在http 加上 server_tokens off;

            如下:

            http {
            ……省略配置
            sendfile on;
            tcp_nopush on;
            keepalive_timeout 65;
            tcp_nodelay on;
            server_tokens off; 
            …….省略配置
            }

            =======================

            隱藏 PHP 版本
            php.ini

            expose_php On
            改成
            expose_php Off

            重啟apache后,php版本在http頭中隱藏了。

             

            ===





            參考解決方案: 

            1. Lighttpd 1.4.20
             
            src/response.c:108 改為:
            buffer_append_string_len(b, CONST_STR_LEN("Server: jufukeji"));
            輸出 Header:
            HTTP/1.1 404 Not Found
            Content-Type: text/html
            Content-Length: 345
            Date: Mon, 12 Jan 2009 13:54:02 GMT
            Server: jufukeji

            2. Nginx 0.7.30 
            src/http/ngx_http_header_filter_module.c:48-49 改為:
            static char ngx_http_server_string[] = "Server: jufukeji" CRLF;
            static char ngx_http_server_full_string[] = "Server: jufukeji" CRLF;
            輸出 Header:
            HTTP/1.1 200 OK
            Server: jufukeji
            Date: Mon, 12 Jan 2009 14:01:10 GMT
            Content-Type: text/html
            Content-Length: 151
            Last-Modified: Mon, 12 Jan 2009 14:00:56 GMT
            Connection: keep-alive
            Accept-Ranges: bytes

            3. Cherokee 0.11.6 
            cherokee/version.c:93 添加:
            ret = cherokee_buffer_add_str (buf, "jufukeji");
            return ret;
            輸出 Header:
            HTTP/1.1 200 OK
            Connection: Keep-Alive
            Keep-Alive: timeout=15
            Date: Mon, 12 Jan 2009 14:54:39 GMT
            Server: jufukeji
            ETag: 496b54af=703
            Last-Modified: Mon, 12 Jan 2009 14:33:19 GMT
            Content-Type: text/html
            Content-Length: 1795

            4. Apache 2.2.11 
            server/core.c:2784 添加:
            ap_add_version_component(pconf, "jufukeji");
            return;
            輸出 Header:
            HTTP/1.1 200 OK
            Date: Mon, 12 Jan 2009 14:28:10 GMT
            Server: jufukeji
            Last-Modified: Sat, 20 Nov 2004 20:16:24 GMT
            ETag: "1920edd-2c-3e9564c23b600"
            Accept-Ranges: bytes
            Content-Length: 44
            Content-Type: text/html

            5. Squid 3.0 STABLE 11 
            src/globals.cc:58 改為:
            const char *const full_appname_string = "jufukeji";
            輸出 Header:
            HTTP/1.0 400 Bad Request
            Server: jufukeji
            Mime-Version: 1.0
            Date: Mon, 12 Jan 2009 15:25:15 GMT
            Content-Type: text/html
            Content-Length: 1553
            Expires: Mon, 12 Jan 2009 15:25:15 GMT
            X-Squid-Error: ERR_INVALID_URL 0
            X-Cache: MISS from 'cache.hutuworm.org'
            Via: 1.0 'cache.hutuworm.org' (jufukeji)
            Proxy-Connection: close

            6. Tomcat 6.0.18 
            java/org/apache/coyote/http11/Constants.java:56 和 java/org/apache/coyote/ajp/Constants.java:236 均改為:
            ByteChunk.convertToBytes("Server: jufukeji" + CRLF);
            輸出 Header:
            HTTP/1.1 200 OK
            Server: jufukeji
            ETag: W/"7857-1216684872000"
            Last-Modified: Tue, 22 Jul 2008 00:01:12 GMT
            Content-Type: text/html
            Content-Length: 7857
            Date: Mon, 12 Jan 2009 16:30:44 GMT

            7. JBoss 5.0.0 GA 
            a. tomcat/src/resources/web.xml:40 改為
            jufukeji
            b. 下載 JBoss Web Server 2.1.1.GA srctar (http://www.jboss.org/jbossweb/downloads/jboss-web/)
            java/org/apache/coyote/http11/Constants.java:56 和 java/org/apache/coyote/ajp/Constants.java:236 均改為:
            ByteChunk.convertToBytes("Server: jufukeji" + CRLF);
            將編譯所得 jbossweb.jar 覆蓋 JBoss 編譯輸出文件:
            JBOSS_SRC/build/output/jboss-5.0.0.GA/server/all/deploy/jbossweb.sar/jbossweb.jar
            JBOSS_SRC/build/output/jboss-5.0.0.GA/server/standard/deploy/jbossweb.sar/jbossweb.jar
            JBOSS_SRC/build/output/jboss-5.0.0.GA/server/default/deploy/jbossweb.sar/jbossweb.jar
            JBOSS_SRC/build/output/jboss-5.0.0.GA/server/web/deploy/jbossweb.sar/jbossweb.jar
            輸出 Header:
            HTTP/1.1 200 OK
            Server: jufukeji
            X-Powered-By: jufukeji
            Accept-Ranges: bytes
            ETag: W/"1581-1231842222000"
            Last-Modified: Tue, 13 Jan 2009 10:23:42 GMT
            Content-Type: text/html
            Content-Length: 1581
            Date: Tue, 13 Jan 2009 10:30:42 GM


            posted on 2012-05-01 06:40 楊粼波 閱讀(2174) 評論(0)  編輯 收藏 引用

            欧美黑人激情性久久| 久久久久久久精品成人热色戒| 久久丫精品国产亚洲av| 久久精品人人做人人爽97| 久久精品这里热有精品| 久久久无码精品午夜| 亚洲AV无码久久| 99久久精品国产一区二区| 久久综合九色欧美综合狠狠 | 一级做a爰片久久毛片看看| 亚洲国产成人久久一区WWW| 久久国产劲爆AV内射—百度| 色狠狠久久AV五月综合| yellow中文字幕久久网| 国产精品久久久久久久app| 99久久精品免费看国产一区二区三区| 久久天天躁夜夜躁狠狠躁2022| 99久久精品毛片免费播放| 亚洲精品国产自在久久| 国产精品美女久久久网AV| 久久久一本精品99久久精品66| 亚洲&#228;v永久无码精品天堂久久| 中文字幕人妻色偷偷久久| 久久婷婷色综合一区二区| 欧美亚洲国产精品久久蜜芽| 久久精品国产久精国产一老狼| 精品久久久久久无码中文字幕| 国产精品久久久久影院嫩草| 亚洲欧美一级久久精品| 久久久久国色AV免费看图片| 国产69精品久久久久99| 久久精品视频免费| 亚洲嫩草影院久久精品| av无码久久久久久不卡网站| 久久精品夜夜夜夜夜久久| 亚洲精品国产字幕久久不卡| 欧美亚洲国产精品久久高清| 国内精品伊人久久久久妇| 狠狠色狠狠色综合久久| 精品久久亚洲中文无码| 久久久久无码精品国产|