How can I associate localhost in Snow Leopard to a specific ip? I've disabled the web server on Snow Leopard, and I'm using an emulated Ubuntu with Lighttpd web server.

In order to access to the web pages I need to specify the ip of the emulated machine. However I now need to associated such ip with "localhost" in Leopard environment.

When I type localhost in Leopard I actually want to visit the localhost on the Ubuntu machine.

Do I need apache on leopard to make the forward or can I change network settings in Leopard or what?
You don't want to do this. As you pointed out, there are warnigs in the /etc/hosts file not to change the localhost entry.

The localhost entry is meant to resolve to the local host and more specifically the loopback address 127.0.0.1. On your Snow Leopard machine, localhost should resolve to your Snow Leopard machine and on your Ubuntu machine, localhost should resolve to your Ubuntu machine.

If you are trying to access the Ubuntu system from your Snow Leopard system, why don't you just use the IP address of the Ubuntu system?