特定の IP 範囲を除外するために、いくつかの古い AWStats 構成ファイルを更新しています。構成ファイルの関連セクションは次のとおりです。
# Do not include access from clients that match following criteria.
# If your log file contains IP addresses in host field, you must enter here
# matching IP addresses criteria.
# If DNS lookup is already done in your log file, you must enter here hostname
# criteria, else enter ip address criteria.
# The opposite parameter of "SkipHosts" is "OnlyHosts".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.]"
# Example: "localhost REGEX[^.*\.localdomain$]"
# Default: ""
#
SkipHosts=""
たとえば、XYZ[97-110] を除外したい
私はこの形式を試しました (注: これらの IP 値ではありません。例としてプライベート範囲を使用しています):
REGEX[^192\.168\.1\.[97-110]]
ただし、次のエラーが発生します。
CGI エラー
指定された CGI アプリケーションは、HTTP ヘッダーの完全なセットを返さないため、不適切な動作をしました。
すべてが異なる RegEx 構文を使用する方法が嫌いです。これがどのように機能するのか、ここで範囲を指定する方法を知っている人はいますか?