6

Because I cannot find where Apache saves log files I tried even to reinstall LAMP, but no luck.

Ubunty 14.04, Apache 2.4, php 7.0.4, mysql 5.(5)

If I ssh to server, should I be able to get a path of this?:

$ echo $APACHE_LOG_PATH

I am getting a blank line!

1 Answers1

3

On a default Ubuntu installation, the Apache configuration file, /etc/apache2/apache2.conf contains the following line to ensure that log files are written by default.

ErrorLog ${APACHE_LOG_DIR}/error.log

The APACHE_LOG_DIR environment variable is set when the Apache service startup script run the shell commands in /etc/apache2/envvars, which include this variable assignment:

export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

Unless you’re running multiple instances of Apache, SUFFIX will be an empty string so the log file directory is, by default, configured to be/var/log/apache2.