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!

multiple shared IPs.

Discussion in 'General Discussion' started by hostnex, Dec 2, 2014.

  1. hostnex

    hostnex Well-Known Member

    Joined:
    May 2, 2008
    Messages:
    77
    Likes Received:
    1
    Trophy Points:
    58
    Location:
    Islamabad, Pakistan, Pakistan
    cPanel Access Level:
    Root Administrator
    Is there anyway to have multiple shared Ips for the cpanel server. Also to assign random shared ips automatically to the new accounts.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,726
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. garconcn

    garconcn Well-Known Member

    Joined:
    Oct 29, 2009
    Messages:
    132
    Likes Received:
    6
    Trophy Points:
    68
    Actually we are doing this for many years. On our server, we usually have 10 shared IPs. We use perl script to call API for provisioning the new accounts. At the beginning, set 1st IP as the main shared IP, then provision 100 accounts on this IP. Then, set 2nd IP as the main shared IP, and provision another 100 accounts on it. If you want randomlize the IP, you can change the shared IP everytime before you provision a new account.

    To prevent any user own the shared IP, you can add virtualhost for each IP in your Apache Include config:

    <VirtualHost 1st_SHARED_IP:80>
    ServerName YOUR_Server_HOSTNAME
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin admin@domain.com
    </VirtualHost>

    <VirtualHost 2nd_SHARED_IP:80>
    ServerName YOUR_Server_HOSTNAME
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin admin@domain.com
    </VirtualHost>

    ## For SSL port
    <VirtualHost 1st_SHARED_IP:443>
    ServerName YOUR_Server_HOSTNAME
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin admin@domain.com
    </VirtualHost>

    <VirtualHost 2nd_SHARED_IP:443>
    ServerName YOUR_Server_HOSTNAME
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin admin@domain.com
    </VirtualHost>
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,726
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes, it's possible to setup a custom application, manually modify the main shared IP address, or setup resellers with shared IP addresses. Note that these are all workarounds, so it's a good idea to vote and add feedback to the feature request to see this functionality included with cPanel natively.

    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