Cobra Forum

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

Title: Unable to start Apache/nginx on a Plesk server: AH02291: Cannot access directory
Post by: Suhitha on Dec 03, 2025, 05:24 AM
Question: Unable to start Apache/nginx on a Plesk server: AH02291: Cannot access directory for error log of vhost


Applicable to:



Symptoms



New configuration files for the Apache web server were not created due to the errors in configuration templates: (2)No such file or directory: AH02291: Cannot access directory '/var/www/vhosts/system/example.com/logs/' for error log of vhost defined at /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf:104




httpd: (2)No such file or directory: AH02291: Cannot access directory '/var/www/vhosts/system/example.com/logs/' for error log of vhost defined at /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf:10


nginx: [emerg] open() "/var/www/vhosts/system/example.com/logs/proxy_access_ssl_log" failed (2: No such file or directory

Cause

The domain's logs directory does not exist on the server.


Resolution

1.Connect to the Plesk server via SSH.

2.Create the missing directories with the command:

# plesk repair fs example.com -y

3.Re-link the logfiles:

3.1. Remove the logs directory inside domain's directory:

# rm -rf /var/www/vhosts/example.com/logs

3.2. Find the system user of a subscription using the command below:

# plesk db "select name, login from domains join hosting on domains.id=hosting.dom_id join sys_users on hosting.sys_user_id=sys_users.id where name='example.com'";
+-------------+-------+
| name        | login |
+-------------+-------+
| example.com | jdoe  |
+-------------+-------+

3.3. Re-link the logfiles:

# plesk sbin relink-vhost-logs --domain-name example.com --sys-user-login jdoe --create

4.Start the Apache web-server:


# service httpd start


# service apache2 start

5.Start the nginx web-server:

# service nginx start