Re: /etc/hosts - hostname alias for 127.0.0.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Mar 07, 2011 at 10:34:24AM -0600, Sean Carolan wrote:
> Can anyone point out reasons why it might be a bad idea to put this
> sort of line in your /etc/hosts file, eg, pointing the FQDN at the
> loopback address?
> 
> 127.0.0.1    hostname.domain.com hostname   localhost localhost.localdomain

Would the application work with a hosts entry like this?

127.0.0.1    hostname.dummy   localhost localhost.localdomain

(Make sure you pick .dummy so as not to interfere with any other DNS.)

In theory you could leave off .dummy, but then you risk hostname being
completed with the search domain in resolv.conf, which creates the
problems already mentioned with putting hostname.domain.com in
/etc/hosts.  (I have not tested this at all!)

--keith

-- 
kkeller@xxxxxxxxxxxxxxxxxxxxxxxxxx

Attachment: pgp206DHr_aAh.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux