I would like to learn how hostname works or how to change it (I don't have cpanel with my vps plan if cpanel is how you do it). When I signed up for vps hosting I selected the hostname 'foo.bar.com' (not the actual name). Later I bought the domain 'abcd.com' and that's what I would like my hostname to be.
While setting up Apache2 I needed to restrict some stuff to only work from the local virtual machine (abcd.com points to the ip for the virtual machine), but it doesn't work unless I use hostname 'foo.bar.com' in my apache config
I understand that selecting 'foo.bar.com' was foolish, because I don't have that domain (bar.com), but I thought I could change /etc/hostname and that would take care of it. I tried changing it to 'abcd.com', but it reverts to 'foo.bar.com' after reboot.