Skip to main content

One site, multiple IP addresses

Comments

11 comments

  • 24x7server
    Hi, You can create multiple shared IPs on a server and use those IPs for multiple websites/account..
    0
  • John Schmerold
    Thank you, but what I am trying to do is use two IP addresses for one url so that if one ISP is down, access to the site can be satisfied via DNS round-robin.
    0
  • Jcats
    You would be better off using a service like DNS Failover and Monitoring | DNS Made Easy otherwise, you could assign multiple A Records for each domain but this will not ensure the traffic is only routed to the 2nd server if it fails.
    0
  • John Schmerold
    We have been using dnsmadeeasy for as long as I can remember - love their service, wish there was an easy way to sync cpanel DNS with dnsmadeeasy. How do I assign multiple A records for each domain? I don't see that option in gui, is it a command line thing?
    0
  • Jcats
    No, you would literally just add a second A Record, example, if you go into WHM > Edit a DNS Zone, check the screenshot. Looks like dnsmadeeasy does have a pugin: DNS Made Easy Unveils CPanel Plugin - Improving DNS for Shared Hosting | DNS Made Easy News but says it doesn't support advanced features like the fail over however that was back in 2013, maybe its better now.
    0
  • John Schmerold
    Thanks for the dnsmadeeasy link, I missed that. Editing the dns record didn't tell apache to use that second IP address, I made the change in DNS, restarted httpd & dns, still got "Sorry....If you are the owner of this website, please contact your hosting provider"
    0
  • Jcats
    You have 2 servers correct? Or are you saying you have 2 different IPs on one server?
    0
  • John Schmerold
    2 different IPs on one server
    0
  • Jcats
    Oh sorry, I misunderstood the initial question then. I don't think this is possible with cPanel even with using an include but basically the apache virtualhost has to look like this:

    or if you literally only have those 2 IP's listening on all interfaces like:

    but this would only work if you manually changed httpd.conf which will be overwritten.. Unless you modified the virtualhost template:
    /var/cpanel/templates/apache2_4/vhost.default
    that first line

    changing it to

    then run
    /scripts/rebuildhttpdconf

    /scripts/restartsrv_apache
    clear your browser history then try browsing to the site again now
    0
  • cPanelMichael
    Hello, While it's supported by Apache 2.4, I don't believe cPanel/WHM will recognize multiple IP addresses assigned to a single Virtual Host. I recommend opening a feature request if it's an option you want to see configurable in WHM: Submit A Feature Request Thank you.
    0
  • John Schmerold
    OK. Thank you.
    0

Please sign in to leave a comment.