2

Ubuntu 16.04 Apache 2.4

I have several virtual hosts defined. Every one defines an own error.log:

ErrorLog ${APACHE_LOG_DIR}/www.xyz.de.80.error.log
CustomLog ${APACHE_LOG_DIR}/www.xyz.de.80.access.log combined

In /etc/apache2/envvars i changed the APACHE_LOG_DIR:

export APACHE_LOG_DIR=/mnt/logs/reverseProxy1$SUFFIX

In /etc/apache2/apache2.conf i set the log level and ErrorLog:

ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel debug

So i have in my apache log dir all virtual hosts access and error log files. In /var/log/apache2 i have several module specific log files and the common apache2 access.log. But i can't find the common apache2 error.log . I am aware that virtual host specific errors will be logged in the specific log files, but i expected to see apache2 core debugging information in a error.log file.

What configuration i miss so that apache2 will create a common error.log?

  • 1
    Enable mod_info and browse to server/server-info to see where the running process thinks it's writing to; the above directive might be being overridden somewhere else. Then check the permissions on the folder and file indicated to make sure the user can write to it. – SmallClanger Apr 9 '18 at 11:34
  • From the server Info: Server Built With: -D DEFAULT_ERRORLOG="logs/error_log" Module core.c: 128: ErrorLog /mnt/apache_logs/reverseProxy1/error.log – Sven Apr 9 '18 at 12:22
  • and In file: /etc/apache2/mods-enabled/ssl.conf 3: ErrorLog /var/log/apache2/ssl_engine.log so this seems the reason, your assumption was right. Thanks for your hint. – Sven Apr 9 '18 at 12:49
  • Thanks, it's restricted to my workstation, and now i have disabled mod_info. @SmallClanger Please create an answer so i can mark the answer as correct solution. – Sven Apr 10 '18 at 13:14
1

By enabling mod_info and browsing to http://server/server-info to see where the running process thinks it's writing to; the above directive was being overridden somewhere else:

Server Built With: -D DEFAULT_ERRORLOG="logs/error_log" Module core.c: 128: ErrorLog /mnt/apache_logs/reverseProxy1/error.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.