Tail all your Web Server Access Logs

by | Mar 27, 2025 | IT Tips | 0 comments

Say for example you have split your web server access logs per domain or account e.g.

1
2
3
4
/var/log/apache/www.example.com_access.log
/var/log/apache/www.toggen.com.au_access.log
/var/log/apache/www.exampe.com.au_access.log
...

If you want to view each request in the terminal as requests come in firstly make sure that your webserver log filenames conform to a simple pattern e.g. ([domain]_access.log) and then do the following

In $HOME/.bash_aliases or wherever you define aliases add an alias:

1
alias logs='tail -f /var/log/apache/*access.log'

Run logs alias to see your logs in the terminal window

1
$ logs

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.