Page 1 of 1

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

Posted: Tue Feb 21, 2023 1:56 pm
by myVesta
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