Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to create subdomains using the Plesk API:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<packet version="1.6.3.2">
    <subdomain>
        <add>
            <parent>example.com</parent>
            <name>testing</name>
            <property>
                <name>php</name>
                <value>true</value>
            </property>
        </add>
    </subdomain>
</packet>

This does create the subdomain, but sets it to use the httpdocs folder (i.e., the same folder as the parent domain).

I reread the documentation, and tried again with the <home> element:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<packet version="1.6.3.2">
    <subdomain>
        <add>
            <parent>example.com</parent>
            <name>testing</name>
            <home>subdomain/testing</home>
            <property>
                <name>php</name>
                <value>true</value>
            </property>
        </add>
    </subdomain>
</packet>

That results in an error message:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.2">
  <subdomain>
    <add>
      <result>
        <status>error</status>
        <errcode>1017</errcode>
        <errtext>Feature supports only for windows version. Request should not have the  home  parameter.</errtext>
      </result>
    </add>
  </subdomain>
</packet>

Surely there's some way to achieve this? (And, frankly, the default behaviour is weird.)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It is poorly documented indeed, but you could probably try the following example (worked on my 11.0):

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.5">
    <subdomain>
        <add>
            <parent>domain.com</parent>
            <name>sub</name>
            <property>
                <name>www_root</name>
                <value>/another_docroot</value>
            </property>
        </add>
    </subdomain>
</packet>

It might not work with earlier Plesk versions though.

share|improve this answer
    
For some reason, I wasn't notified of this answer. It never arrived in my inbox. I've tested it now, and it works. Thanks. –  TRiG Oct 5 '12 at 11:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.