Skip to content

Instantly share code, notes, and snippets.

@sushidub
Last active May 16, 2018 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sushidub/0bc381a3f7d0063de7afc1592662e380 to your computer and use it in GitHub Desktop.
Save sushidub/0bc381a3f7d0063de7afc1592662e380 to your computer and use it in GitHub Desktop.
Apache server scripts I find useful

/http.conf

ErrorLogFormat "\n\n\n______________[%{cu}t] \tLocal: %A \tClient: %a \n\tMessage: %M\n\tModule: %m\n\tLevel: %l\n\tSource: %F\n\tReferer: %{Referer}i\n\n\n"

Combine the above with an error log stream while performing work...

#!/bin/sh
tail -f -n 5 error_log \
| \
sed \
-e '
'/^.*Message:.*$/' {
  i\
  '`tput setaf 5; tput bel`'
  a\
  '`tput sgr0`'
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment