1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Create Subdomain on different home with RCP API

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by jebbie23, Mar 20, 2012.

  1. jebbie23

    jebbie23 Guest

    0
     
    Hello out there,

    i am using Plesk RCP API with a PHP Project and basically it works fine. I need to create several subdomains on my server through the RCP API and there is a huge issue in my eyes:

    <packet version="1.5.2.0">
    <subdomain>
    <add>
    <parent>maindomain.com</parent>
    <name>test</name>
    <home>/httpdocs</home>
    <property>
    <name>php</name>
    <value>true</value>
    </property>
    </add>
    </subdomain>
    </packet>

    It's like the documentation says in the examples ("Creating a subdomain on subfolder"):
    http://download1.parallels.com/Plesk/Plesk8.3/Doc/en-US/plesk-8.3-api-rpc/53497.htm

    So, it should work! At least that's what i think...

    So, i currently don't really know where is the "start-point" of this "home"-parameter... So i tried some variants of the "home-path"... but on any value i choose, it's happening always the same stuff:

    the response says status=ok, the creation of the subdomain works and it points always to the same directory:

    /var/www/vhosts/maindomain.com/subdomain/test/httpdocs

    Thats not nice! Because the documentation is saying clearly that it must be possible!

    When i go to the config file "httpd.include" of my "maindomain.com", i see that the subdomain is created completely wrong, just ingoring the whole "home-parameter" of my api call..

    and when i change there the directory directly in the "httpd.include" file, and restart the server.. the subdomain is working like a charm, pointing directly to the folder of the maindomain.com -.-


    Why this odd behavior? What am i making wrong? I have searched the whole web about this issue, and all i find are some other threads, asking exactly the same (but not written with so much information, so i decided to create a new thread) -> but there is never an answer about that...
     
  2. jebbie23

    jebbie23 Guest

    0
     
    Ok funny.. i have found the solution by myself.

    It was the Plesk Version... sorry i'm still verry new in Plesk and.. yea.. later on the evening yesterday, i found the command-line tool "subdomain" inside of psa/bin

    In the manual of this tool, there was missing an option "--www-root".. so i thought, maybe my plesk version just can't handle the change of the home-directory... So i made an update from Plesk 9 to 10 and hurray, its working now from the API!
     
Loading...