PDA

View Full Version : [ubuntu] [SOLVED] Apache logs


ub007
July 30th, 2008, 07:00 AM
Hi,

I'm trying to load test my Apache web server with Http requests.How can I view the logs for these requests?Thanks in advance...cheers
David

gvartser
July 30th, 2008, 07:06 AM
tail -f /var/log/apache2/access.log

/g

ub007
July 30th, 2008, 07:18 AM
thank you,that helps....can i extract the log to a file?

gvartser
July 30th, 2008, 07:23 AM
the log is a file located in:
/var/log/apache2/access.log.

the syntax: "tail -f" is simply reading the file continuously.
But you can also do a "cat" or "more" on the file allowing you to browse the file.

But if you need to extract it to another file, just simply do a cat with a redirect.

Example:
cat /var/log/apache2/access.log > /tmp/my_apache_access_log_file.txt

/g

ub007
July 30th, 2008, 07:25 AM
thank you:guitar: