Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Bulk Add Parked Domains to One Account?

Discussion in 'Bind/DNS/Nameserver' started by captlid, May 1, 2019.

Tags:
  1. captlid

    captlid Registered

    Joined:
    May 1, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    usa
    cPanel Access Level:
    Root Administrator
    Hi, I looked through the documentation and it advises to use the api's. I wrote a script that calls the api, but it's really slow.

    I couldn't get the json api working for the life of me.

    I used this call
    https://hostname:2087/scripts/park?domain=domain.com&ndomain=parkeddomain.net

    in a php script using curl. The script runs real slow. No surprise there since it has to make 2000 seperate network calls.

    I need to park about 2000 domains.

    I have root access to the server. It has whm/cpanel version 78 on centos 6.1.

    I wanted to know where the parked domains are stored on the operating system and just copy/paste them in and restart apache to acknowledge the new settings. [There is only cpanel user.]

    Also are there any other files besides the apache configuration file that need to be edited?

    DNS is being externally managed by my registrar.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,301
    Likes Received:
    2,155
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. captlid

    captlid Registered

    Joined:
    May 1, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    usa
    cPanel Access Level:
    Root Administrator
    Hi Michael, I wrote a script that works and uses the commands given in the cpanel documentation. It takes at least 3 seconds to add each domain. That's 6000 seconds for 2000 domains.

    I also tested the cpapi2 command it is also very slow. :(

    I also read that thread you are referencing, its from 2010. The member by the name of merenda showed instructions on how to do it from the command prompt via ssh. Do her instructions still apply in 2019? If yes I can write a bash script to do so. That would be way faster. :)

    Regards,
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,301
    Likes Received:
    2,155
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @captlid,

    The manual modification of the files in /var/cpanel/userdata/ is unsupported. While the cPanel API 2 function may take longer, it's the best way to ensure the appropriate configuration files are populated with the correct information.

    You can still use a bash script with a cPanel API 2 function. For instance, here's an example cPanel API 2 command:

    Code:
    cpapi2 --user=username Park park domain=example.com topdomain=subdomain
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice