Symptoms
-
The following error message is shown on the Home page in Plesk:
PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: No such file or directory.
-
The file /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf does not exist on the server:
# ls -l /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf
ls: cannot access /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: No such file or directory -
The domain example.com has been removed from the server recently.
-
The following messages appears in /var/log/plesk/panel.log:
ERR [1] PleskUtilException: '/usr/local/psa/admin/bin/apache-config' '-l' '/var/www/vhosts/system/example.com/conf/httpd.conf:/etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf' failed with code 100. stdout: stderr: Path /var/www/vhosts/system/example.com/conf/httpd.conf doesn't exist
ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/vhostmng-structure'] with exit code [1]
ERR [1] '/usr/local/psa/admin/bin/vhostmng-structure' failed with code 1.
stdout:
Unable to remove dir system/example2.com: Directory not empty
stderr:
Unable to remove dir system/example2.com: Directory not empty
System error 39: Directory not empty
ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code [1]
ERR [1] '/usr/local/psa/admin/bin/apache-config' '-t' failed with code 1.
stdout:
stderr:
httpd: Syntax error on line 250 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 119 of /etc/httpd/conf/plesk.conf.d/vhosts/example2.com.conf: Include directory '/var/www/vhosts/system/example2.com/conf/siteapp.d' not found
Cause
Product issue:
-
#PPPM-7236 “Creating or deleting domains on a server that has a larger number of subscriptions (more than 100) no longer occasionally causes the “httpd: Syntax error on line” error being shown.”
Fixed in:- Plesk Obsidian 23 June 2020 (Linux)
- Plesk Onyx 17.8 17 April 2018 (Linux)
- Plesk Onyx 17.5 12 December 2017 (Linux)
Resolution
Workaround
If update is not possible for some reason you may try the following
workaround
In order to get rid of the error message completely, it is required to re-create configuration files.
Note: In case sites now are up and running, perform the actions below in the maintenance frame.
-
Connect to the Plesk server via SSH.
-
Regenerate configuration files for all domains:
# /usr/local/psa/admin/bin/httpdmng –reconfigure-all
Note: During this operation websites will be unavailable.
-
Install the latest Plesk updates: How to update Plesk?