星期四, 9月 27, 2018

Plesk shows error with custom template: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhostIpDefault.php

Symptoms

The following error is shown on main page of Plesk:
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: Template domain/service/wordpress.php doesn't exists file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: TemplateException: Template domain/service/wordpress.php doesn't exists file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: Template_Exception: Template domain/service/wordpress.php doesn't exists file: /usr/local/psa/admin/plib/Template/Finder.php line: 25 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

Cause

Corrupted or invalid /usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.phpfile, which acts as a custom template configuration files.

Resolution

  1. Connect to the server using SSH.
  2. 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 /usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php.backup
  3. Rebuild Apache configuration:
    Warning: Reconfiguration implies downtime, which depends on the number of domains.
    # /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
  4. If the issue persists, move all the custom templates:
    # mv /usr/local/psa/admin/conf/templates/custom /usr/local/psa/admin/conf/templates/custom_old
  5. Delete information about failed configuration:
    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin -Dpsa -Ne "delete from Configurations where status='error'"
  6. Rebuild Apache configuration:
    Warning: Reconfiguration implies downtime, which depends on the number of domains.
    # /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

沒有留言: