17
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?