cPanel - Cannot access directory '/etc/apache2/logs/domlogs/'

When trying to restart Apache, you may be presented with an error message as follows:

(2)No such file or directory: AH02297: Cannot access directory '/etc/apache2/logs/domlogs/' for log file '/etc/apache2/logs/domlogs/domain.com-bytes_log' defined at /etc/apache2/conf/httpd.conf:286
To fix this, run the following commands:

mkdir /etc/apache2/logs/domlogs
chown root:wheel domlogs
/scripts/restartsrv_httpd

An output such as the below should be displayed if the restart was successful:

# /scripts/restartsrv_httpd
Waiting for “httpd” to start ……waiting for “httpd” to initialize ………finished.

Log Messages
[Mon Sep 05 10:38:35.192031 2016] [mpm_prefork:notice] [pid 13331] AH00163: Apache/2.4.23 (cPanel) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 configured -- resuming normal operations
[Mon Sep 05 10:38:35.147431 2016] [:notice] [pid 13330] ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.

httpd started successfully.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

You may be familiar with ClamAV and Maldet (aka Linux Malware Detect). They're widely known as two excellent choices for identifying malware. What you may not realize, however, is that they can be...

Read More ...

On cPanel servers, you may come across the process /usr/local/cpanel/bin/mysqluserstore/usr/local/cpanel/bin/mysqluserstore creates and updates the /var/cpanel/databases/users.db and...

Read More ...

If your server is running cPanel/WHM, simply execute the below commands via SSH (as root):wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.shsh...

Read More ...

If you're like us, you'll want your server's timezone to match your local time to make log management easier. Fortunately, this is easy to do! This guide works perfectly on servers running CentOS...

Read More ...

This nifty command allows you to built up a list of the largest files and directories:FS='/';clear;date;df -h $FS; echo "Largest Directories:"; du -hcx –max-depth=2 $FS 2>/dev/null | grep [0-9]G...

Read More ...