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.

assign IP to a domain

Discussion in 'General Discussion' started by napraviculom, Mar 18, 2010.

  1. napraviculom

    napraviculom Member

    Joined:
    Dec 30, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    OK, this is the situation:

    I have an addon domain on one of my accounts in WHM and I want to change it's IP. IP multiaddress is available and I've created a new one (different than the 'default' one).

    There are other domains on this account as well and they share some data. So, the problem is, if I move this specific domain to another account I'm not sure if I'll be able to reach data from that other account.

    Is it maybe possible to change the IP to just one domain inside one account?

    Any other ideas would be appreciated.
     
    #1 napraviculom, Mar 18, 2010
    Last edited: Mar 18, 2010
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Is it possible --- YES, absolutely!

    It is recommended --- NO!

    The reason I say this is that in order to change the IP address on a single domain under an account, you will need to make a number of manual modifications to httpd.conf, the dns zone file, etc configs, and cpanel's account records and then update cpanel's data records so as not to get all your changes overwritten later.

    Yes it can be done but I don't recommend anyone not otherwise very comfortable and experiences with manual systems administration making any attempt in doing so.

    My personal recommendation if you want to give a single domain it's own IP address is remove the domain from the account as an add-on or parked domain and set it up as it's own hosting account along with it's own IP and then there is nothing to update, edit, or keep in sync.
     
  3. napraviculom

    napraviculom Member

    Joined:
    Dec 30, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    OK, tnx.

    But if I do that, I won't be able to access the database this domain uses on the current account. Or is there a way ?

    Linking to the files on other account is not a problem, but connecting to the DB might be, I suppose.
     
  4. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    There is no issues using a single database for multiple accounts. You need to mention the dbname, dbuser and password in the config file of the application you are using on the domain. Your website will then use the database to add/edit/delete records in them as per your queries.
     
  5. napraviculom

    napraviculom Member

    Joined:
    Dec 30, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I forgot that I can select any host in mysql_connect.
    Tnx!

    EDIT: Though I didn't need to change it, since they're both on the same host - 'localhost'
     
    #5 napraviculom, Mar 19, 2010
    Last edited: Mar 19, 2010
  6. napraviculom

    napraviculom Member

    Joined:
    Dec 30, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    OK, so now I've created a new account and changed it's IP address (after adding one).

    Now when I open my domain in browser I get that blueish page with "Great Success !
    Apache is working on your cPanel® and WHM™ Server..."

    Is there something else I should configure concerning the change of the IP address ?
    ( The domain works fine when it is on the main shared IP.)
     
  7. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Are the name servers assigned to the domain are resolving to your server itself? If they are resolving elsewhere, make sure you correct the 'A' and other records there. If they are all correct, allow sometime for the website to propagate on the new IP and it should be fine.
     
  8. napraviculom

    napraviculom Member

    Joined:
    Dec 30, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I'm not really sure I understand what you're saying.
    I'll wait until tomorrow and see if it was the matter of propagation.
    Tnx.
     
  9. napraviculom

    napraviculom Member

    Joined:
    Dec 30, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    So, the waiting didn't solve my problem.

    My main shared IP address is xxx.xxx.xxx.114. Do the IP addresses I ad have to have the same first three triads as the main shared IP and following the order (xxx.xxx.xxx.115) or can it be any (valid) IP ?

    Basicaly, I wanted to change the IP for my new domain so it doesn't look anything like the main shared IP.

    So, I entered a random IP address (212.52.221.54). It didn't work.

    EDIT: And another question: Is it possible to buy another IP from different ISP and is that something that can be configured easily?
     
    #9 napraviculom, Mar 22, 2010
    Last edited: Mar 22, 2010
Loading...

Share This Page