The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to set subdomain directory via API2

Discussion in 'General Discussion' started by RobertBurns22, Jul 25, 2015.

  1. RobertBurns22

    RobertBurns22 Registered

    Joined:
    Jul 25, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    California
    cPanel Access Level:
    Root Administrator
    I am trying to set the subdomain directory (ALL) as a default directory "accounts" so that it is /public_html/accounts/created_subdomain_directories_here via an API2 call

    I have tried 'dir' => '/public_html/accounts/ . $domain', - which is the same string variable passed globally with the subdomain name that works to create the subdomain - but it does not work with this array (PHP) and the other two do

    $parameters = array(
    'rootdomain' => $rootdomain,
    'domain' => $domain,
    'dir' => '/public_html/accounts/ . $domain',
    );

    'dir' => '/public_html/accounts' creates the cgi directory in "accounts" and the domain directory in the docment root.

    Does someone know how to do this properly ??
     
  2. RobertBurns22

    RobertBurns22 Registered

    Joined:
    Jul 25, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    California
    cPanel Access Level:
    Root Administrator
    Silly me - apostrophe in wrong spot . . .

    'dir' => '/public_html/accounts/'. $domain,

    FIXED and working . . . as desired !!!
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page