Applicable to:
- Plesk for Linux
Symptoms
The following error is shown in Plesk GUI:
New configuration files for the Apache web server were not created due to the errors in configuration templates:
Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhostIpDefault.php,
error = TemplateException:
...
Cause
Corrupted or invalid Custom Template configuration file.
Resolution
Warning: Reconfiguration of web server configurations implies downtime, which depends on the number of domains.
-
Connect to the server via SSH
-
Create a backup of
/usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php
using the following command:# mv /usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php{,.backup}
-
Rebuild web server configuration by using Plesk Webserver Configuration Troubleshooter in Plesk GUI
-
If the issue persists, move all the custom templates:
# mv /usr/local/psa/admin/conf/templates/custom{,.old}
-
Delete information about failed configuration:
# plesk db "delete from Configurations where status='error'"
-
Rebuild web server configuration by using Plesk Webserver Configuration Troubleshooter in Plesk GUI
Comments
3 comments
I'm unable to create a new domain. I ran a script to automatically update the improper AUTO_INCREMENTS value. That was sucessful. However, I now have new error messages (below) which brought me to this article. I get stuck on step two, I don't have a folder "templates". I'm running Plesk Onyx.
# mv /usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php{,.backup}
mv: cannot stat ‘/usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php’: No such file or directory
#
The errors that brought me to this article:
New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = Template_Exception: No data. file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: Template_Variable_Exception: No data. file: /usr/local/psa/admin/plib/Template/Variable/AbstractCachedData.php line: 67 code: 0. Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter
Error: phpinimng failed: configuration test '/usr/sbin/php-fpm --test' failed with code 78, and message: [05-Apr-2020 13:18:26] WARNING: Nothing matches the include pattern '/opt/plesk/php/7.3/etc/php-fpm.d/*.conf' from /opt/plesk/php/7.3/etc/php-fpm.conf at line 119. [05-Apr-2020 13:18:26] ERROR: No pool defined. at least one pool section must be specified in config file [05-Apr-2020 13:18:26] ERROR: failed to post process the configuration [05-Apr-2020 13:18:26] ERROR: FPM initialization failed
Hi @Jeffrey Zeunert,
"AUTO_INCREMENTS value" should not affect this setting.
This article is applicable when there are custom templates exist on a server. it is indicated in the symptoms:
# find /usr/local/psa/admin/conf/templates/custom -type f
Your error regarding missing templates mean that there are no custom templates. So we can ignore "No such file or directory" error regarding custom templates and concentrate on the main error:
New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = Template_Exception: No data.
To fix it, try to run:
# plesk repair web
If it does not help, consider submitting a support request to Plesk directly or to a reseller, depending on where the license was purchased.
Hi Yulia. Thanks for your help. I ended up doing the upgrade to Obsidian and that resolved the problem. Good to know about custom templates and # plesk repair web.
Please sign in to leave a comment.