Unable to create a subdomain using API query


2017-01-26 19:10:00 UTC


2017-08-08 13:21:19 UTC


Was this article helpful?

Have more questions?

Submit a request

Unable to create a subdomain using API query

Applicable to:

  • Plesk for Linux


  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. 


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


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.


Have more questions? Submit a request


Please sign in to leave a comment.