The hosts file is enough, what is needed is a way to assign an ip address to a process/service like you can with port numbers.