• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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