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.

Main Shared IP & Other settings in cPanel Template (VM)

Discussion in 'General Discussion' started by milind, Jan 23, 2012.

  1. milind

    milind Well-Known Member

    Joined:
    Jan 15, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Nasik (Maharashtra), India
    cPanel Access Level:
    Root Administrator
    Hello Everyone,

    To reduce the time of cPanel installation or OS with cPanel (using cpanel iso) we have created a template of configured VM but the problem is when we create a new VM using that template cPanel use template VM IP as main shared IP and other configurations like nameservers as well. Is it possible to flush or clear the IP and configuration in template and start VM as completely fresh? If yes, which are the different files i need to modify or change.

    Please assist.
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You need to edit /etc/wwwacct.conf. This file contains the main shared IP address. This file is automatically written when you install cPanel with our installer, but it is simply copied over, incorrect information at all, when you copy it as part of a template.
     
  3. milind

    milind Well-Known Member

    Joined:
    Jan 15, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Nasik (Maharashtra), India
    cPanel Access Level:
    Root Administrator
    Thanks for the reply Jared. Before creating template we have removed the Main Shared IP of the server and kept it as blank but when any VM comes online with that template is doesn't contain new IP but it remain just blank.

    Is there anyway to automatically update this file when server boots for the first time?
     
  4. hoststop

    hoststop Well-Known Member

    Joined:
    Dec 6, 2011
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Bolton, UK
    cPanel Access Level:
    Root Administrator
    A customized script can be used while server boots for the first time using which the actual server IP is added to /etc/wwwacct.conf
     
  5. milind

    milind Well-Known Member

    Joined:
    Jan 15, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Nasik (Maharashtra), India
    cPanel Access Level:
    Root Administrator
    Thanks for the update. Is it possible to give some hints about how that script will be and where it can be loaded?
     
  6. hoststop

    hoststop Well-Known Member

    Joined:
    Dec 6, 2011
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Bolton, UK
    cPanel Access Level:
    Root Administrator
    You can use a script which will delete the old IP from /etc/wwwacct.conf, add a new one which is listed in ipconfig. You can use this script the time VM boots [/etc/rc.local]. Once server boots for the first time, remove the entry as well.
     
Loading...

Share This Page