Websites are showing 502 Bad Gateway page.
Apache is stopped and fails to start with the following message:
# service httpd start Starting httpd: Syntax error on line 16 of /etc/httpd/conf/plesk.conf.d/server.conf: DocumentRoot must be a directory [FAILED]
or with the following one:
# service httpd start Starting httpd: Syntax error on line 16 of /etc/httpd/conf/plesk.conf.d/server.conf: DocumentRoot '/var/www/vhosts/default/htdocs' is not a directory, or is not readable [FAILED]
Default document root is missing or has incorrect ownership.
Find path to document root in
By default it is set as
# grep 'DocumentRoot' /etc/httpd/conf/plesk.conf.d/server.conf DocumentRoot "/var/www/vhosts/default/htdocs"
Check if directory exists on server:
# ls -ld /var/www/vhosts/default/htdocs ls: cannot access /var/www/vhosts/default/htdocs: No such file or directory
Create directory if it is missing:
# mkdir /var/www/vhosts/default/htdocs
Set correct ownership:
# chown root:root /var/www/vhosts/default/htdocs
# service httpd start