17
18

More than 5 years have passed since last update.

Apacheで特定のアクセスをログに残さない

Last updated at Posted at 2014-09-01

Raspberry piをSDカードで運用しているのですが、書き込み回数を抑えたいため調査。

/etc/apache2/sites-enabled/000-default
-  CustomLog ${APACHE_LOG_DIR}/access.log combined
+  SetEnvIfNoCase Request_URI "\.(gif|jpg|png|css|js|woff)$" no_log
+  SetEnvIfNoCase Request_URI "nagios_checker.html$" no_log
+  CustomLog ${APACHE_LOG_DIR}/access.log combined env=!no_log

これでno_logに該当するアクセスはログから除外される。

参考

17
18
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
18