ワームの長いリクエストをログに残さない設定法

ネットで検索し、色々試しましたが、下記の方法で対応しています。 
    http://toritome.exblog.jp/
    atsuko さんの情報を参考にしました。

    TurboLinux Server 8 の場合、設定ファイル httpd.conf は以下のディレクトリにあります。
    /etc/httpd/conf/httpd.confの設定を変更します

596    # CustomLog /var/log/httpd/access_log common

609    CustomLog /var/log/httpd/access_log combined env=worm

978    <IfModule mod_setenvif.c>

        #
        # The following directives modify normal HTTP response behavior.
        # The first directive disables keepalive for Netscape 2.x and browsers that
        # spoof it. There are known problems with these browser implementations.
        # The second directive is for Microsoft Internet Explorer 4.0b2
        # which has a broken HTTP/1.1 implementation and does not properly
        # support keepalive when it is used on 301 or 302 (redirect) responses.
        #
        BrowserMatch "Mozilla/2" nokeepalive
        BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0

        #
        # The following directive disables HTTP/1.1 responses to browsers which
        # are in violation of the HTTP/1.0 spec by not being able to grok a
        # basic 1.1 response.
        #
        BrowserMatch "RealPlayer 4\.0" force-response-1.0
        BrowserMatch "Java/1\.0" force-response-1.0
        BrowserMatch "JDK/1\.0" force-response-1.0

        Setenvif Request_Method "GET|POST|PUT|DELETE|HEAD|OPTIONS" worm

        </IfModule>

Logフォーマットが
combined になっていることを確認し
赤字の部分を追加し、httpdを再起動します。

    worm
:好きな名前でよいそうです。

以上で、ワーム攻撃のLogが残らなくなりました。

TOP