- Plesk for Linux
When restarting Apache or checking configuration syntax, the following warnings appears:
CONFIG_TEXT: Warning: DocumentRoot [/var/www/vhosts/example.com/httpdocs/test1] does not exist: bad user name.
Website is not accessible:
CONFIG_TEXT: 502 Bad Gateway
Error in Plesk Panel:
PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: Warning: DocumentRoot [/var/www/vhosts/example.com/httpdocs/test1] does not exist
Non-existent directory is specified as Document Root for a domain/subdomain in Plesk.
Note: if you don't have access to the server via SSH, contact your hosting provider regarding the issue.
Apply one of the following solutions:
2. Correct the site location for mentioned domains at Plesk > Domains > example.com > Hosting Settings.
1. Log in to Plesk server via SSH
2. Identify the correct directory ownership:
# ls -ld /var/www/vhosts/example.com
3. Create mentioned directories manually:
# mkdir -p /var/www/vhosts/example.com/httpdocs/test1
4. Assign correct ownership:
# chown exampleuser:psaserv /var/www/vhosts/example.com/httpdocs/ && chown exampleuser:psaserv /var/www/vhosts/example.com/httpdocs/test1