Last active
April 29, 2016 07:10
-
-
Save sergejmueller/8feabb2684a431db2f0c to your computer and use it in GitHub Desktop.
NGINX: Keine WeMonit-Requests im Access Log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http { | |
| ... | |
| include /etc/nginx/conf.d/wemonit.map; | |
| ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| ... | |
| access_log /var/log/nginx/access.log if=$is_not_wemonit; | |
| ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| map $http_user_agent $is_not_wemonit { | |
| default 1; | |
| ~wemonit 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment