Checking Apache2 logs

The default location of apache log files on ubuntu server apache2 installation is:


in order to view the log file contents you can use any of the following commands:

displays the whole contents of the log file

cat /var/www/apache2/access.log

shows the contents from the end of access.log file and wait to display any additional logs appended to the end of the file

tail -f /var/www/apache2/access.log

displays the last 100 mb of the apache2 log file

tail -c 104857600 /var/log/apache2/access.log


If you would like to extract the last 100 mb of the log file to some other file, you can achieve this by executing the command:

tail -c 204857600 /var/log/apache2/access_sacoffice_log > log.log

After this, you can download the log file and check the logs ! 🙂

Majd Arbash


Leave a Reply