How to list only requests that have been processed by Apache/PHP

Post Reply
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Discarding all requests to static files:

Code: Select all

grep 'HTTP/1.0' /var/log/apache2/domains/SOMEDOMAIN.COM.log
Or sort by IP addresses that sent the most requests (based on the last 1000 requests):

Code: Select all

grep 'HTTP/1.0' /var/log/apache2/domains/SOMEDOMAIN.COM.log | tail -n 1000 | awk '{print $1}' | sort | uniq -c | sort -n
Or grep by some IP or anything else, but only logs for php access:

Code: Select all

grep 'xxx.xxx.xxx.xxx' /var/log/apache2/domains/SOMEDOMAIN.COM.log | grep 'HTTP/1.0'
To check archived.*.gz files - see viewtopic.php?f=29&t=622
Post Reply