Last active
September 28, 2018 15:03
-
-
Save pixmin/927791b16f758d24a1900d4dcde7afc3 to your computer and use it in GitHub Desktop.
Tail Apache access logs
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
| #!/bin/bash | |
| tail -n 200 -f /var/log/apache2/www.labelleiloise.fr/access.log \ | |
| | grep -vE ".png|.jpg|.gif|.js|.ico|.css|.svg|POST /bms-admin/ajax|.woff2|/php-fpm-status" \ | |
| | egrep --color '^|POST|GET|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|HTTP/1.1" [^2][0-9]{1,2}' | |
| # first egreo regex is for IP Address, | |
| # second is for HTTP reponse codes other than 2xx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment