This article will show you how to see Apache log files on a dedicated server or virtual private server. If you're having trouble with your web server or simply want to know what Apache is doing, log files should be your first port of call. Apache keeps track of all visitors to your site as well as any issues the server encounters. Apache does this through the use of two sorts of log files: access logs and error logs.

Access logs for Apache
Apache employs access log files to keep track of every visitor to your website. You can observe which files visitors view, how the web server reacts to requests, and other details such as the web browsers they use.

VPS and managed dedicated servers
You may inspect raw Apache access logs in cPanel if you have a managed Dedicated Server or VPS.

VPS and unmanaged dedicated servers
You have root access if you have an unmanaged Dedicated Server or VPS. This implies you can do whatever you want with the Apache access log files.

For example, you can log in to your server using SSH and type the following command to view the last 100 lines in the Apache access log:

sudo tail -100 /etc/httpd/logs/access_log
sudo tail -100 /var/log/apache2/access.log (For UBUNTU or DEBIAN)

Apache Error logs

The Apache error log stores information about any problems or anomalies that occur.
Many of the "errors" recorded by Apache are relatively small, such as a visitor requesting a file that does not exist.
Apache also uses error logs to record warnings that could indicate a problem with a specific event or setting.

VPS and managed dedicated servers
You may inspect raw Apache access logs in cPanel if you have a managed Dedicated Server or VPS.

VPS and unmanaged dedicated servers
If you have an unmanaged Dedicated Server or VPS, you have root access. This means you can manipulate and process the Apache error log files anyway you wish.

For example, you can log in to your server using SSH and type the following command to view the last 100 lines in the Apache error log:

sudo tail -100 /etc/httpd/logs/error_log
sudo tail -100 /var/log/apache2/error.log (For UBUNTU or DEBIAN)


 
 
Was this answer helpful? 0 Users Found This Useful (0 Votes) apache web server, apache access logs, apache error logs