Unable to create a subdomain using API query

Created:

2017-01-26 19:10:00 UTC

Modified:

2017-08-08 13:21:19 UTC

3

Was this article helpful?


Have more questions?

Submit a request

Unable to create a subdomain using API query

Applicable to:

  • Plesk for Linux

Symptoms

  1. Apache 2.4 is installed on the server.
  2. It is not possible to create a subdomain using API query, the following error can be found in Plesk:

    Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = Template_Exception: Empty content was provided for config file /var/www/vhosts/system/one.example.com/conf/httpd.conf file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php line: 47 code: 0. 

Cause

This is Plesk bug with ID #PPPM-3924 which is planned to be fixed in future Plesk updates.

Resolution

As a workaround, execute the API query from a different domain on the server or from a different server.

For Centos 7 Plesk 17.0 the following workaround is acceptable:

1. Make a backup of the existing file Agent.php :

# mv /usr/local/psa/admin/plib/api-rpc/Agent.php /root/

2. Unpack the attached file to the /usr/local/psa/admin/plib/api-rpc/ directory on the server.

With the custom fix installed site during the execution API request via PHP will return 502 error which caused by web server restart on site creation. This is normal behavior for such scenario.

Attachments:

Have more questions? Submit a request

2 Comments

Please sign in to leave a comment.