Applicable to:
- Plesk for Linux
Symptoms
-
All websites hosted in Plesk are not accessible.
-
The Apache web server fails to start with the following error message in the system logfile:
-
on CentOS/RHEL-based distributions:
# grep "Cannot access directory" /var/log/messages
(2)No such file or directory: AH02291: Cannot access directory '/etc/httpd/logs/' for main error log -
on Debian/Ubuntu-based distributions:
# grep "Cannot access directory" /var/log/syslog
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
-
Cause
The Apache directory for logfiles is missing.
Resolution
-
Connect to the Plesk server via SSH.
-
Create the missing Apache directory and set required permissions:
# mkdir /etc/httpd/logs
# mkdir /var/log/httpd
# chown root:root /var/log/httpd
# chmod 700 /var/log/httpd
# ln --symbolic /var/log/httpd /etc/httpd/logs -
Start the Apache service:
# service httpd start
-
Connect to the Plesk server via SSH.
-
Create the missing Apache directory and set required permissions:
# mkdir /var/log/apache2
# chmod 750 /var/log/apache2
# chown root:adm /var/log/apache2 -
Start the Apache service:
# service apache2 start
Comments
0 comments
Please sign in to leave a comment.