Question about changing hostname on my VPS

hi…

just a brief overview… i registered for a linux cpanel VPS with my 1st site when i started… let’s say www.happy.com

so the VPS was automatically assigned the hostname server1.happy.com

now i have a new website… www.sad.com

i want to change the hostname because i don’t want the hostname for the www.sad.com domain to be server1.happy.com (seems a bit ironic doesn’t it?)

can i register a new domain and use it to be the hostname… example: www.website.com … then i change the hostname on my VPS to server1.website.com

so in this case… both www.happy.com and www.sad.com will have the hostname server1.website.com ?

or does the hostname NOT show up anywhere so i will not need to change it? my whole point of changing the hostname is because i don’t want people to see www.sad.com having a hostname from server1.happy.com

hope i made myself clear enough for u to help me…

thanks in advance!

No idea, but I’ve had a lot of web servers in my day and I’ve never had one where the machine’s hostname matched anything that was being served.

More often than not, hosting server names don’t actually match what they host. No.

Take the default host name for any server from a big company, and its usually… <someform of encoding of ip address>.hostingcompany.com - 123-123-234-123.hostingcompany.com as an example.

To change a Linux hostname, it will depend slightly on which flavour of Linux it is, Redhat and similar for example, stores the hostname in /etc/sysconfig/networking - I can’t just off the top of my head rememeber where debian etc stores it.