Applicable to:
- Plesk for Linux
Symptoms
- Warning appear on Apache restart or configuration syntax checking:
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
Cause
Non-existent directory is specified as Document Root for a domain/subdomain in Plesk.
Resolution
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:
Solution I
- Log in to Plesk
- Correct the site location for the mentioned domain at Domains > example.com > Hosting Settings.
Solution II
- Log in to Plesk server via SSH
- Identify the correct directory ownership:
# ls -ld /var/www/vhosts/example.com
- Create the directory mentioned in the warning:
# mkdir -p /var/www/vhosts/example.com/httpdocs/test1
- Assign correct ownership:
# chown exampleuser:psaserv /var/www/vhosts/example.com/httpdocs/ && chown exampleuser:psaserv /var/www/vhosts/example.com/httpdocs/test1
Comments
2 comments
So what do you do when the domain doesn't exist in plesk?
@Ian, in case domain was removed from Plesk it is needed to check where in apache configs information about non existing directory is left and update these configs manually
Please sign in to leave a comment.