• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Resolved XML API php : Assign a existing certificate to a subdomain.

RARJ

New Pleskian
Hi,
I create subdomain with the XML API on php language. The subdomain is created succefully and the SSL certificate is actived. I have 3 certificate in the server, but I dont know how I assign one of this to the subdomain in the request Packet.
Here is the packet :

<packet>
<subdomain>
<add>
<parent>domain.name</parent>
<name>$alias</name>
<property>
<name>www_root</name>
<value>httpdocs/$alias/</value>
</property>
<property>
<name>ssl</name>
<value>true</value>
</property>
<property>
<name>same_ssl</name>
<value>true</value>
</property>
<property>
<name>fastcgi</name>
<value>true</value>
</property>
<property>
<name>ssi</name>
<value>true</value>
</property>
<property>
<name>php</name>
<value>true</value>
</property>
<property>
<name>php_handler_id</name>
<value>plesk-php56-fastcgi</value>
</property>
</add>
</subdomain>
</packet>

Thank you for help me.
 

Attachments

  • plesk.jpg
    plesk.jpg
    18.3 KB · Views: 10
You need to use <site> operator with <parent-site-id>1</parent-site-id> instead of <subdomain> https://docs.plesk.com/en-US/onyx/a...g-sites-domains/creating-a-site.66574/#o66579

Here is example:

<packet>
<site>
<add>
<gen_setup>
<name>sub555.example.com</name>
<webspace-id>12</webspace-id>
<parent-site-id>1</parent-site-id>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ssl</name>
<value>true</value>
</property>
<property>
<name>certificate_name</name>
<value>Lets Encrypt example.com</value>
</property>
</vrt_hst>
</hosting>
</add>
</site>
</packet>
 
Back
Top