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.

Problem with main domain after transfer

Discussion in 'General Discussion' started by shaibn, Dec 29, 2009.

  1. shaibn

    shaibn Member
    PartnerNOC

    Joined:
    Dec 29, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    After a successful restore of a cPanel backup, the main domain of the account does not have a virtualhost in the httpd.conf file and thus, shows in WHM that it can't identify the IP address nor can I assign it an IP.

    I tried the rebuild httpd conf but that didn't bring it back.
    I also can't find the zone for it...

    Other then terminating the account and re-creating it manually, what else can I do?

    Thanks in advance!
     
  2. Janak

    Janak Well-Known Member

    Joined:
    Jul 18, 2009
    Messages:
    71
    Likes Received:
    1
    Trophy Points:
    6
    You can try after manually adding virtualhost entry in httpd.conf file.
     
  3. shaibn

    shaibn Member
    PartnerNOC

    Joined:
    Dec 29, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    But won't it get lost if we issue a rebuild of the httpd.conf in the future?
     
  4. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    No, it won't be lost on a further Apache rebuild. Don't forget to restart the httpd service once you add the VirtualHost entry for the domain.
     
  5. shaibn

    shaibn Member
    PartnerNOC

    Joined:
    Dec 29, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Should I edit /usr/local/apache/conf/httpd.conf or /etc/httpd/conf/httpd.conf ?

    Or maybe one of the includes?
     
  6. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    The file under /etc is hard linked to the one under /usr so both the files are same and you have to edit any one of it.

    120722524 -rw------- 1 root root 20895 Dec 28 04:56 /etc/httpd/conf/httpd.conf
    120722524 -rw------- 1 root root 20895 Dec 28 04:56 /usr/local/apache/conf/httpd.conf
     
    #6 madaboutlinux, Dec 29, 2009
    Last edited: Dec 29, 2009
  7. shaibn

    shaibn Member
    PartnerNOC

    Joined:
    Dec 29, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    After I edited httpd.conf, I did /scripts/rebuildhttpdconf and the virtual host I created was removed.

    What am I doing wrong? You said it won't be removed next time...
     
  8. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Well, always backup the configuration file before you edit. Now, edit the file once again, add the VirtualHost entry and execute the following two commands:

    then restart the httpd service. See if that makes a difference.
     
  9. shaibn

    shaibn Member
    PartnerNOC

    Joined:
    Dec 29, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I've come to the conclusion, that my original restoration of this backup was not accurate. I will pursue this a different way. Thanks for the assist thus far though :)

    Happy new year!
     
Loading...

Share This Page