I'm currently working on a Linode Ubuntu 20.04 VPS with a cPanel installation. Upon trying to access to the control panel (<server_ip>:2083), the browser resolves the IP to localhost:2083
and fails to open the control panel.
I've setup my /etc/hosts
file as follows, according to the explanation in this Linode guide:
# /etc/hosts
127.0.0.1 localhost
<vps_ipv4> <my_domain>.com main-server
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
<vps_ipv4> <vps_ipv4>.cprapid.com <vps_ipv4>
I'm pretty much sure that the root of the problem lies here. Still, I'm a just a backend dev, completely new to server administration, so I haven't figured out where I messed up.
I have checked the rDNS for the IP and it matches my domain. I have also checked that the domain (which is managed through Linode) has the corresponding A records matching my instance's IP address. I've also disabled the UFW
firewall, to no avail.