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.

Setting up cPanel accounts using multiple shared ips

Discussion in 'cPanel Developers' started by TomPi, Nov 11, 2015.

  1. TomPi

    TomPi Member

    Joined:
    Nov 11, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hello,
    I recently created for a client an application to manage thousands of his domains, which also includes the creation of cPanel accounts and emails.
    This so far is very easy and works perfect using the whm json api.

    Now we have added two additional ips to the server. I specified the ip for a new account using the parameter "customip". So far no problem - but when trying to set up the next domain / account using the same additional ip I can not reuse this ip again, since it is used as dedicated ip for the formerly created account.

    How can I set up multiple shared ips via WHM (manually) and use them correctly via xml api?

    Actually I am using the following parameters:

    PHP:
    $data = array("username" => $this->domain_user,
                        
    "domain" => $this->domain,
                        
    "plan" => $this->domain_plan,
                        
    "quota" => "0",
                        
    "password" => $this->domainPassword,
                        
    "cgi" => "false",
                        
    "frontpage" => "false",
                        
    "dkim" => "1",
                        
    "hasshell" => "false",
                        
    "contactemail" => $this->contactEmail,
                        
    "customip" => "$this->ip");
    Thanks a lot in advance for any help and for reading - have a nice day!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    There's no native support for multiple shared IP addresses at this time, but feel free to vote and add your feedback to the feature request at:

    Multiple Shared IP Addresses

    In the meantime, current workarounds include updating the main shared IP address, or setting up resellers for each IP address.

    Thank you.
     
  3. TomPi

    TomPi Member

    Joined:
    Nov 11, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hi,

    thanks for your answer - I'll try setting up resellers for each additional IP address.

    Thanks again!
     
  4. TomPi

    TomPi Member

    Joined:
    Nov 11, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hello again,

    I have set up an reseller account using an existing account and using the IP address which should be used as the additional shared IP.
    I have granted this reseller account root access and the tried to create an account via json api authentication not as root but as reseller using the resellers name (account name).

    The response is:

    Code:
    {"result":"false",
    "output":{
    "cpanelresult":{
    "apiversion":"2","error":"Access denied","data":{
    "reason":"Access denied","result":"0"
    },"type":"text"}
    }
    }
    
    What am I doing wrong?

    Thanks in advance!
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  6. TomPi

    TomPi Member

    Joined:
    Nov 11, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Thanks a lot for your fast reply.
    I figured out, that I forgot to create (and use) the hash for the reseller account... sorry, my fault.
    Now it works!

    Thanks again!
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page