Cobra Forum

Plesk Panel => Webserver => Topic started by: Suhitha on Dec 03, 2025, 06:23 AM

Title: Unable to start Apache web server on a Plesk server: "Unable to open logs" or
Post by: Suhitha on Dec 03, 2025, 06:23 AM
Question: Unable to start Apache web server on a Plesk server: "Unable to open logs" or "Cannot access directory"


Applicable to:




Symptoms


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


                              For CentOS/RHEL-based distributions


1.Connect to the Plesk server via SSH.

2.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

3.Start the Apache service:

# service httpd start


                        For Debian/Ubuntu-based distributions


1.Connect to the Plesk server via SSH.

2.Create the missing Apache directory and set required permissions:

# mkdir /var/log/apache2
# chmod 750 /var/log/apache2
# chown root:adm /var/log/apache2

3.Start the Apache service:

# service apache2 start