Apache log location and how to check log files in ubuntu?

Apache log location and how to check log files in ubuntu?

Hello Dudes, 
Today, we are going to learn about apache log location and how to check log files in ubuntu? This tutorial goes into details on how to check apache error and access log file in ubuntu and where are located these files. 
So let's get started without wasting time. 

 

Apache Log Location in Ubuntu:

Just run the following command to go the apache2 log files location. cd command use to navigate between directories. 

cd /var/log/apache2

Now run the ls command. 

ls

This command will show all the error and access files in apache2 directory as like bellow:

access.log  error.log  other_vhosts_access.log

 

Check apache error log:

Run the following command to check the apache error log file. 

cat /var/log/apache2/error.log

 

See Apache Access Log File:

You can check access log file with the following command. 

cat /var/log/apache2/access.log

You can open access.log and error.log file in the terminal with the cat command.

I hope it will help you. 
Happy Learning :)

Leave a Comment

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

Go To Top
×