Domain reconfiguration fails with error: Class 'Template_Writer_Apache' not found in /opt/psa/admin/conf/templates/custom/server.php

Created:

2016-11-16 12:49:39 UTC

Modified:

2017-07-18 09:29:16 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Domain reconfiguration fails with error: Class 'Template_Writer_Apache' not found in /opt/psa/admin/conf/templates/custom/server.php

Symptoms

Domain reconfiguration fails with the following error:

# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
)

Details: PHP Fatal error: Class 'Template_Writer_Apache' not found in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 4
Releasing semaphore 4 in request cleanup

The following error can be found in the /usr/local/psa/admin/logs/panel.log :

Fatal error: Class 'Template_Writer_Apache' not found in /opt/psa/admin/conf/templates/custom/server.php

Cause

Custom templates are corrupted.

By the design Plesk Panel uses configuration templates from /opt/psa/admin/conf/templates/custom/ if this directory exists, otherwise the /opt/psa/admin/conf/templates/default/ is used.

Resolution

To fix the issue the move /opt/psa/admin/conf/templates/custom/ and re-run the httpdmng utility:

# mv /opt/psa/admin/conf/templates/custom/ /opt/psa/admin/conf/templates/custom_mvd

# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

If you would like to introduce your changes to the configuration, copy the templates you need to the /usr/local/psa/admin/conf/templates/custom/ directory and modify them, preserving the directory structure, and then modify these copies. Please refer to the documentation to get the additional information.

Have more questions? Submit a request
Please sign in to leave a comment.