Can’t find apache error logs

apache-2.2logging

It seems my server doesn't have error logs . i can't find them anywhere . in info.php file there is no mention about any error log.
I tried commands like pico /usr/local/apache/logs/error_log ,but of course,no results.
How can i find the apache error logs and view them ?

thanks for the help

Best Answer

Default apache error log location, by distro's:

RHEL / Red Hat / CentOS / Fedora - /var/log/httpd/error_log
Debian / Ubuntu - /var/log/apache2/error.log
FreeBSD - /var/log/httpd-error.log

To find exact apache error log file location, you can use grep command:

# grep ErrorLog /usr/local/etc/apache22/httpd.conf
# grep ErrorLog /etc/apache2/apache2.conf
# grep ErrorLog /etc/httpd/conf/httpd.conf

Sample output:

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a 
ErrorLog "/var/log/httpd-error.log"

Source.

Related Topic