What to do When Plesk Cannot Generate new Apache config Files?

What to do When Plesk Cannot Generate new Apache config Files?

Plesk is a state-of-the-art web hosting and server automation cloud-based software. It can automate tasks and processes either on a single or across multiple servers.

But one common problem many Plesk admins face is when Plesk cannot generate new Apache config fies. In this article, we explain how to fix this error.

How to handle the Plesk cannot generate new Apache config files issue?

When Plesk won’t be able to generate the required Apache config files, you’re going to see the following message:
Code:
Template processing failed: file = /opt/psa/admin/conf/templates/default/domainVhost.php, error = Template_Exception: [Template_Variable_Domain_PhysicalHosting] Wrong variable to subsitute: maintenanceMode file: /opt/psa/admin/plib/Template/Processor.php line: 27 code: 0 Previous error: Template_Exception: [Template_Variable_Domain_PhysicalHosting] Wrong variable to subsitute: maintenanceMode file: /opt/psa/admin/plib/Template/Processor.php line: 27 code: 0 Previous error: Template_Exception: [Template_Variable_Domain_PhysicalHosting] Wrong variable to subsitute: maintenanceMode file: /opt/psa/admin/plib/Template/Variable/Abstract.php line: 67 code: 0.
New configuration files for the Apache web server were not created due to the errors in configuration templates:

Custom Apache virtual host templates are used in Plesk. These template contain the syntax error or refer to a nonexistent variable.

To fix this issue, here are the steps you need to follow:
  • Connect to the server via SSH
  • Next, move the custom templates folder to a different location using this command:
Code:
mv -f /usr/local/psa/admin/conf/templates/custom /root/custom_templates/
  • Rebuild the web server config files using these commands:
Code:
RHEL-based OS - /usr/local/psa/admin/sbin/httpdmng –reconfigure-all
Debian-based distributions - /opt/psa/admin/sbin/httpdmng –reconfigure-all
Code:
When executing these commands, it’s recommended to refer to the Plesk Advanced Administration Guide for a list of allowed variables. You should then use the variables accordingly.

Now Plesk should generate Apache config files. If you need more assistance, contact your hosting provider support team.
Author
kumkumsharma
Views
398
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top