Apache access log and error log locations
The location of Apache access logs and error logs on Ubuntu is defined by the environment variable "APACHE_LOG_DIR".
It is defined in the "envvars" file in the directory where the Apache configuration files are located.
export APACHE_LOG_DIR = / var / log / apache2 $SUFFIX
$SUFFIX is an empty string when only one Apache is running, so the Apache log directory will be "/ var / log / apache2".
sudo ls / var / log / apache2
access.log access.log.13.gz access.log.5.gz error.log error.log.13.gz error.log.5.gz other_vhosts_access.log other_vhosts_access.log.13.gz other_vhosts_access.log.5. gz access.log.1 access.log.14.gz access.log.6.gz error.log.1 error.log.14.gz error.log.6.gz other_vhosts_access.log.1 other_vhosts_access.log.14.gz other_vhosts_access.log.6.gz access.log.10.gz access.log.2.gz access.log.7.gz error.log.10.gz error.log.2.gz error.log.7.gz other_vhosts_access.log.10.gz other_vhosts_access .log.2.gz other_vhosts_access.log.7.gz access.log.11.gz access.log.3.gz access.log.8.gz error.log.11.gz error.log.3.gz error.log.8.gz other_vhosts_access.log.11.gz other_vhosts_access .log.3.gz other_vhosts_access.log.8.gz access.log.12.gz access.log.4.gz access.log.9.gz error.log.12.gz error.log.4.gz error.log.9.gz other_vhosts_access.log.12.gz other_vhosts_access .log.4.gz other_vhosts_access.log.9.gz
Except for the latest and the previous access log, it seems to be compressed to GZIP format.