Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Domains redirecting to default web page

Discussion in 'General Discussion' started by RalphOtowo, Jan 14, 2019.

Tags:
  1. RalphOtowo

    RalphOtowo Member

    Joined:
    Jan 14, 2019
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nigeria
    cPanel Access Level:
    Root Administrator
    I've recently setup a WHM/cPanel instance on an AWS EC2 instance using the official AMI.

    I used the transfer tool to migrate an account from an existing WHM server and everything appears to have made it over to the destination server successfully.

    I have updated /etc/hosts on my machine to map the destination server's IP address to the domain name which is still pointed at the old WHM server. This is required to verify that everything works as expected on the destination server before I update live DNS records. All attempts to visit example.com (placeholder) load the ...cgi-sys/defaultwebpage.cgi page.

    After lots of searching and suggestions from similar articles, I opted to test the website using another domain name, example2.com - I created an A record mapping example2.com to the destination server's IP address, then proceeded to add example2.com as an Alias under the sole cPanel account, with the document root set to the /public_html but this also redirects to the ...cgi-sys/defaultwebpage.cgi page like above.

    I've tried regenerating the httpd.conf file, and confirmed that the WHM has correctly identified my NAT setup. I've executed the /scripts/build_cpnat script and the results shows that the private IP address is mapped to the public IP. Under Basic WebHost Manager Setup, I've repeatedly set the IPv4 address to my private IP but this is automatically updated to reflect the public IP address.

    I've checked the /etc/apache2/conf/httpd.conf configuration file and confirmed that the VirtualHost block is being generated correctly with the primary domain and secondary (test domain - example2.com) set as ServerName and ServerAlias variables respectively.

    It beats me how cPanel/WHM totally disregards the web server configurations and continues to redirect to the ...cgi-sys/defaultwebpage.cgi page. One answer here suggested deleting the DNS zone if the domain isn't hosted on the destination WHM server, which I've done, all to no avail.

    I desperately require some assistance here.
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    312
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Make sure that your instance is using elastic IP and that should fix the issue. EC2 instances when rebooted always changes the IP if its not elastic one.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. RalphOtowo

    RalphOtowo Member

    Joined:
    Jan 14, 2019
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nigeria
    cPanel Access Level:
    Root Administrator
    Thank you for responding. The EC2 instance has an elastic (static) IP address associated and will persist through reboots. That's not the issue.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,002
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. RalphOtowo

    RalphOtowo Member

    Joined:
    Jan 14, 2019
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nigeria
    cPanel Access Level:
    Root Administrator
    Hello @cPanelMichael,

    The first domain name is resolving to the destination cPanel server. I should point out that I do not wish to use any nameservers on cPanel/WHM. I've added a local DNS record to point the domain at the cPanel/WHM's server IP address using my operating system's host file.

    The second domain name is also pointed at the cPanel/WHM server. In this case, not using the host file but an actual A record from the DNS manager for the domain name. And all machines I've tested with show that that the DNS changes have propagated. Regardless, I continue to see the default page.

    It might help to point out that I've worked with several servers running Apache/Nginx and can confidently manage a Linux server with these web servers. However, my understanding of cPanel/WHM is limited.
     
    #5 RalphOtowo, Jan 15, 2019
    Last edited by a moderator: Jan 15, 2019
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,002
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    If the domain name is resolving to the same IP address that's assigned to the account on the new cPanel & WHM server, then it sounds like an issue with the Apache configuration as opposed to any local DNS settings on your workstation. Can you open a support ticket so we can take a closer look at the affected system and see if we notice anything wrong with how it's configured? You can post the ticket number here and I'll link this thread to it.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. RalphOtowo

    RalphOtowo Member

    Joined:
    Jan 14, 2019
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nigeria
    cPanel Access Level:
    Root Administrator
    Hi @cPanelMichael,

    This has been resolved. This is what I needed to see, your response on this thread.
    I was unaware that the records had to be added within cPanel even if the DNS is managed externally. I had deleted the DNS zones and also disabled nameservers as I wasn't planning to use them. Seems weird but I guess it's needed for some internal DNS querying.

    Thanks for your assistance. Consider this resolved.
     
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,002
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi @RalphOtowo,

    I'm glad to see you were able to solve the issue, and thank you for taking the time to let us know what the problem was. I've marked this thread as solved.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice