Установил апач, добавил в файл hosts запись: 127.0.1.2 test.
nslookup test
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find test: NXDOMAIN
Соответсвенно в браузере при вводе в адресную строку test происходит поиск в интернете, а не на локальной машине.
uname -a
Linux support3 3.8.0-31-generic #46-Ubuntu SMP Tue Sep 10 20:03:44 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Файл /etc/hosts:
127.0.0.1 localhost
127.0.1.1 computer
127.0.1.2 test
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters