Hello,
I'm migrating from an old server to a new server running cPanel/WHM v86.0.18 and I'm in the process of migrating and testing two websites, let's say example.com and web.example.com.
These two websites are currently hosted on the old server, both with the same IP, let's say 168.212.226.204. Obviously, the new server has a different IP, let's say 177.131.188.194, but the websites will have the same URL.
Now, example.com will make a PHP cURL request to web.example.com to authenticate the users on both the websites, but the problem I'm facing is that the cURL request on the new server is going to web.example.com:168.212.226.204 instead of going to the new IP, and this is understandable.
When I'm testing the websites on Windows, a simple edit to the hosts file will do the trick, but when I edit the /etc/hosts file in CentOS to point to the new IP, every cURL request fails and I can't even ping web.example.com without losing all the packets.
My question is: how can I reproduce the hosts file edit of Windows in CentOS? Is there a way in WHM to do it? Thanks.
I'm migrating from an old server to a new server running cPanel/WHM v86.0.18 and I'm in the process of migrating and testing two websites, let's say example.com and web.example.com.
These two websites are currently hosted on the old server, both with the same IP, let's say 168.212.226.204. Obviously, the new server has a different IP, let's say 177.131.188.194, but the websites will have the same URL.
Now, example.com will make a PHP cURL request to web.example.com to authenticate the users on both the websites, but the problem I'm facing is that the cURL request on the new server is going to web.example.com:168.212.226.204 instead of going to the new IP, and this is understandable.
When I'm testing the websites on Windows, a simple edit to the hosts file will do the trick, but when I edit the /etc/hosts file in CentOS to point to the new IP, every cURL request fails and I can't even ping web.example.com without losing all the packets.
My question is: how can I reproduce the hosts file edit of Windows in CentOS? Is there a way in WHM to do it? Thanks.