• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

API for subdomains

JuanCar

Regular Pleskian
My system is plesk 10.1 on Linux
I've try to create a subdomain following API RPC references and...
1. Script can't creae an FTP for user who own this subdomain
2. Script can create folder on subdomains/<nameofsubdomain>/hpttpdocs using www-root property

What I want is to create a subdomain, the root of this subdomain must be in <domain</subdomains/<nameofsubdomain>httpdocs and there must be an FTP account to access this folder (and only this folder)
I can make this in Plesk Panel but I want to create usin API (unatended)

Is there any fix to those errors?

Ah, my XML
<?xml version='1.0' encoding='utf-8'?>
<packet version='1.6.2.0'>
<subdomain>
<add>
<parent>".$dominio."</parent>
<name>".$sitio."</name>
<property>
<name>ftp_login</name>
<value>".$sitio."</value>
</property>
<property>
<name>ftp_password</name>
<value>".$passSitio."</value>
</property>
<property>
<name>asp</name>
<value>false</value>
</property>
<property>
<name>ssi</name>
<value>false</value>
</property>
<property>
<name>php</name>
<value>false</value>
</property>
<property>
<name>cgi</name>
<value>false</value>
</property>
<property>
<name>perl</name>
<value>false</value>
</property>
<property>
<name>python</name>
<value>false</value>
</property>
<property>
<name>coldfusion</name>
<value>false</value>
</property>
<property>
<name>fastcgi</name>
<value>false</value>
</property>
<property>
<name>miva</name>
<value>false</value>
</property>
<property>
<name>ssl</name>
<value>false</value>
</property>
<property>
<name>same_ssl</name>
<value>false</value>
</property>
<property>
<name>www_root</name>
<value>/subdomains/".$sitio."/httpdocs</value>
</property>
</add>
</subdomain>
</packet>

($sitio, $passSito and so are variables from php and they are correct)
Thanks
 
No

This is good for Windows but I need a solution for linux.
I'll try use events. When a subdomain is created Plesk throws event 39, I link a script to create the FTP.
It's tricky, but it's the only way I found.

Thanks
 
I think you can try this call for Unix too. This feature has been originally introduced for Windows, but since 10.0 shall be available for both Unix and Windows. Let me know if the call doesn't work and meanwhile I will check with developers.

Regards
 
Api ftp

Is there any fix for that bug in 10.4.4?
I think it's not unusual to create a FTP account when a subdomain is created, so you can have a user to manage just this subdomain, and without access to other subdomains.

I wait for an answer.

Thanks

Ops, I've found that this fix is in the las update of API.

Thanks
 
Last edited:
Back
Top