Change location of apache error.log

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello @MarkoTitel,

One way to do this is to setup a symbolic link in-case anything else still relies on the default path. EX:

Code:
touch /path/to/new/error_log
mv /etc/apache2/logs/error_log /etc/apache2/logs/error_log.backup
ln -s /path/to/new/error_log /etc/apache2/logs/error_log
/scripts/restartsrv_httpd
Then, browse to WHM >> Apache Configuration >> Include Editor and define the new path in the Pre Main Include section with an entry like this:

Code:
ErrorLog /path/to/new/error_log
Thank you.