• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Creating a site alias through the XML API causes trouble in Plesk

Sam

New Pleskian
Hi Folks,

I'm currently having a bit of an odd problem using the XML API. We have an automated process that adds site aliases for a subscription. Oddly enough, while the API call itself causes no errors, newly added aliases will not work due to problems with configuration templates. Whenever one is added through the API (creating one manually in Plesk works just fine), Plesk shows the following alert on the next Panel visit:
New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainWebmail.php, error = Template_Exception: Empty content was provided for config file /etc/httpd/conf/plesk.conf.d/webmails/horde/domainname.com_webmail.conf file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php line: 47 code: 0. Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.
Regenerating the configuration files like Plesk suggests fixes the issue until another alias is added, but that kind of beats the point of using the API. I've tried reinstalling/uninstalling Horde (we're not using it), but to no avail.

Has anyone else run into this kind of problem before and/or knows a way to get around this?

Many thanks in advance.
 
Try to run this command:

# i=1; for dom in $(mysql -uadmin -p$(cat /etc/psa/.psa.shadow) -Dpsa -ss -e "select d.name from dom_param dp, domains d where param='webmail' and val ='horde' and dom_id=d.id and d.status=0 and htype='vrt_hst';"); do [[ ! -f /etc/httpd/conf/plesk.conf.d/webmails/horde/${dom}_webmail.conf ]] && echo $i ${dom} && i=$[$i+1] ; done

It will show list of domains with missing *_webmail.conf files.
After that run command

# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

and later run first command again. Make sure that number of domains with missing *_webmail.conf files still the same.
 
Thanks for the quick response IgorG.

Here's what I tried:
- Ran the command: 0 domains with missing configuration files.
- Added an alias through the API
- Ran the command: the domain now has a missing configuration file.
- Reconfigured domains
- Ran the command: back to 0 domains with missing configuration files.

Removing Horde seems to solve the problem for Horde configuration files, but the same problem occurs with Atmail as well.
 
Atmail? It has been EOLed by its vendor and excluded from the Plesk distribution starting from Plesk version 11.5 if I'm not mistaken.
 
Atmail is likely still on the server due to Plesk upgrades in the past. Probably a bad example. Same problem also seems to apply to Roundcube.
 
The problem does not seem to be specific to webmail configuration files. Disabling webmail entirely on the server replaces the error with the following:
New configuration files for the Apache web server were not created due to the errors in configuration templates: 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/domainname.com/conf/httpd.conf file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php line: 47 code: 0. Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.
 
Do you have installed CBM (Customer and Business Manager) on this Plesk server?
 
In this case I can only recommend to create a request to support team to do in-depth investigation to find the reason and to fix it. Please create a ticket to support at https://www.odin.com/support/request/ .
You may have free support, please check what kind of Plesk license you use for available support options at http://kb.odin.com/en/121580 .
If there’s no free support in your case, you can order Plesk per-incident support at http://www.odin.com/support/buy-support/ Support team will contact you as soon as purchase is processed, and they will do the best to resolve it.
If it is found that your problem was caused by product bug w/o available solution or workaround from Odin, then your purchase will be re-funded.
 
Back
Top