Article ID: 112885, created on Aug 16, 2013, last review on May 11, 2014

  • Applies to:
  • Plesk for Linux/Unix

问题

在 Parallels Plesk Panel 主页上您可以看到以下错误信息:
 
Error: 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.
 
当您在 Parallels Plesk Panel 数据库中查看此信息时会看到以下信息:
 
# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -Nse"select * from Configurations where status='error' \G"

         id: <some id>
       name: domainVhost
       file:
    version: <some.version>
 objectType: domain
   objectId: <needed ID>
     status: error
description: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = SQLSTATE[HY093]: Invalid parameter number: no parameters were bound
	

解决方案

1) 获取问题域名的 objectID:

mysql> select objectId from Configurations where status='error';
+----------+
| objectId |
+----------+
|      129 |
+----------+
2) 查看是否是子域名:

mysql> select id,name,parentDomainId from domains where id=129;
+-----+----------------+----------------+
| id  | name           | parentDomainId |
+-----+----------------+----------------+
| 129 | blog.mr-int.ch |             59 |
+-----+----------------+----------------+
1 row in set (0.00 sec)
如果不是子域名,请使用 domains.id as Subscriptions.object_id;如果是,请使用 domains.parentDomainId(如此处所示):

3) 获取指定域名的订阅 ID:

mysql> select id, object_id from Subscriptions where object_id=59;
+----+-----------+
| id | object_id |
+----+-----------+
| 45 |        59 |
+----+-----------+
1 row in set (0.00 sec)
4) 查看该订阅是否有 apsContext 表格中的项:

mysql> SELECT `apsContexts`.* FROM `apsContexts` AS `apsContexts` WHERE (`pleskType` = 'hosting' AND `pleskId` = 129);
+----+-----------+-----------+-------+----------------+
| id | pleskType | pleskId   | ssl   | subscriptionId |
+----+-----------+-----------+-------+----------------+
| 11 | hosting   |129        | false |             0  | 
+----+-----------+-----------+-------+----------------+
5) 最后添加正确的订阅 ID 至 aspContexts 表格:

mysql> update apsContexts set subscriptionId=45 where pleskId=129;

 
然后您需要使用 Parallels Plesk Panel   中的超链接创建新的 Apache 配置。 

a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article