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.

different IP inside domain

Discussion in 'General Discussion' started by michael_m, May 25, 2009.

  1. michael_m

    michael_m Registered

    Joined:
    Dec 7, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Actually I have 2 questions:

    1.
    How can I set different ip to domain and subdomain, for example:

    domain.com - 10.0.0.1
    secure.domain.com - 10.0.0.2

    2.
    is there a way to share the same username for all domains inside one account?
    it asks for different username for every addon domain.

    thank you
    michael
     
  2. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    localhost
    Yes, you can use different Ip for the subdomain. Edit your httpd.conf file on your server. Find for secure.domain.com. In the VirtualHost entry change the Ip from 10.10.10.1 to 10.10.10.2 which will look like "<VirtualHost 10.10.10.2:80>"

    Nope, the username for the Addon domain will be the same. If you try to use the main username while adding the Addon domain, you won't be able to add the domain..
     
  3. LDHosting

    LDHosting Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    93
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Somebody correct me if I'm wrong, but won't cPanel overwrite the VirtualHost again following an update?

    The way I've always changed an IP for an addon/subdomain is:

    1. Edit the "IP:" line in /var/cpanel/userdata/username/sub.domain.tld
    2. Run /scripts/rebuildhttpdconf
    3. Restart Apache

    Also, you'll need to update the A record for the subdomain in your DNS servers
     
  4. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    localhost
    Yes, that works fine too.. But if you make the changes in the httpd.conf it won't change after the updates...

    ARGHH... Not sure as to how did I missed this in my previous reply... :mad:
    Thanks DaZeD81 for updating this...
     
  5. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    I believe it does change after the updates.
     
  6. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    One need to restart apache server after making changes in httpd.conf to get the changes in to effect.
     
Loading...

Share This Page