バーチャルホスト(vhosts)設定時のApacheログ指定設定
<VirtualHost 192.168.1.100:80>
ServerAdmin webmaster@mail.aconus.com
DocumentRoot “/home”
ServerName www.sample.com
<Directory “/home”>
Options FollowSymLinks Includes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
UserDir /home/*/public_html
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews SymLinksIfOwnerMatch ExecCGI IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
ErrorLog logs/error_log
SetEnvIf Remote_Addr 192.168. homelog nolog
SetEnvIf Request_URI “default.ida” wormlog nolog
SetEnvIf Request_URI “root.exe” wormlog nolog
SetEnvIf Request_URI “cmd.exe” wormlog nolog
SetEnvIf Request_URI “Admin.dll” wormlog nolog
CustomLog logs/home_log common env=homelog
CustomLog logs/worm_log common env=wormlog
SetEnvIf Request_URI “\.(gif)|(jpg)|(png)|(ico)|(css)$” nolog←画像関係のログは無視
SetEnvIf Remote_Addr 192.168.0. nolog←内部アクセスは無視
CustomLog logs/access_log combined
</VirtualHost>
<VirtualHost 192.168.1.101:80>
ServerAdmin info@mail.sample.com
DocumentRoot “/var/www”
ServerName www.example.com
<Directory “/var/www”>
Options FollowSymLinks Includes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/example.com-error_log
SetEnvIf Remote_Addr 192.168. homelog nolog
SetEnvIf Request_URI “default.ida” wormlog nolog
SetEnvIf Request_URI “root.exe” wormlog nolog
SetEnvIf Request_URI “cmd.exe” wormlog nolog
SetEnvIf Request_URI “Admin.dll” wormlog nolog
CustomLog logs/home_log common env=homelog
CustomLog logs/worm_log common env=wormlog
SetEnvIf Request_URI “\.(gif)|(jpg)|(png)|(ico)|(css)$” nolog←画像関係のログは無視
SetEnvIf Remote_Addr 192.168.0. nolog←内部アクセスは無視
CustomLog logs/access_log combined
</VirtualHost>
Comment