Apache configuration is corrupted: New files of configuration for Apache web server were not built due to errors in configuration templates

Created:

2016-11-16 12:58:28 UTC

Modified:

2017-04-22 05:51:44 UTC

2

Was this article helpful?


Have more questions?

Submit a request

Apache configuration is corrupted: New files of configuration for Apache web server were not built due to errors in configuration templates

Symptoms

The following error is shown for a subscription:

Error: New configuration files for the Apache web server were not created due to the errors in configuration templates: Destination directory '/etc/nginx/plesk.conf.d/vhosts' not exist.

The following error may be shown on Plesk homepage:

New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click here to retry generating configuration

There are a lot of entries in "error" status in Configurations table in psa database:

mysql> select id,objectId,status,description from Configurations where status="error";
+------+----------+--------+-------------------------------------------------------------------+
| id | objectId | status | description |
+------+----------+--------+-------------------------------------------------------------------+
| 9 | 1 | error | Destination directory '/etc/nginx/plesk.conf.d/vhosts' not exist |
| 13 | 2 | error | Destination directory '/etc/nginx/plesk.conf.d/vhosts' not exist |
| 17 | 3 | error | Destination directory '/etc/nginx/plesk.conf.d/vhosts' not exist |
| 25 | 5 | error | Destination directory '/etc/nginx/plesk.conf.d/vhosts' not exist |

Rebuilding of web server configuration files fails with an error:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-all
2016-09-23T13:51:14-07:00 ERR (3): Apache config (14746638730.91104700) generation failed:

Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
)

Details: Empty error message from utility.

Cause

Domains' configuration is broken

Solution

Log in to Plesk database and check which domains' configuration is corrupted:

mysql> select id,objectId,status,description from Configurations where status="error";

Depending on the quantity of domains in the output apply one of the following two solutions.

I. Solution to fix a few domains

Reconfigure domains one by one:

# /usr/local/psa/admin/sbin/httpdmng  --reconfigure-domain example.com

II. Solution to fix all domains in bulk

  1. Remove all entries from the psa.Configurations :

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e"delete from Configurations"
  2. Reconfigure Apache using the httpdmng utility:

    ~# /usr/local/psa/admin/bin/httpdmng --reconfigure-all
Have more questions? Submit a request
Please sign in to leave a comment.