• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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