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.

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:
    8
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    garconcn Well-Known Member

    Joined:
    Oct 29, 2009
    Messages:
    98
    Likes Received:
    1
    Trophy Points:
    8
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page