Are you talking about the machine that is the web server? If so, you can certainly set the hostname to www.whatever.com
Probably the most important factor is what you have propogated in dns. a dns record can point to for instance
192.168.0.1 as www and you can use cnames.
Also, you can bind as many IP addresses to a singe NIC as you want.
Here is a for instance...
ifconfig eth0 192.168.0.1
ifconfig eth0:0 10.10.10.1
ifconfig eth0:1 220.127.116.11
etc etc etc.
Now in your web server, you are merely going to create virtual hosts. They can be done on a name basis, or using ip based. If you do ip based, then those "virtual IP adresses" above will come into play.
Note: those virtual addresses made at the command line are only good until you reboot. If you want them retained via the boot process, then you need to make entries in the /etc/network/interfaces file
(I am assuming that box is debian based)
If it is redhat, then the file would be /etc/sysconfig/network-scripts/ifcfg-eth0:0 eth0:1 etc
So before any help can come that way, are you first off dealing with hostnames for the web server? Are you using apache web server using ip based or named based virtual hosts?