You are not logged in.
Hi everybody,
probably this is a less than newbie questions but I can't figure out what is the right way to set my hosts files within this framework:
1) Two registred domains pointing to my ip address: www.bonfus.it, argo.mooo.com
2) nslookup of wan ip address:
nslookup 79.41.201.100
Server: 192.168.2.1
Address: 192.168.2.1#53
Non-authoritative answer:
100.201.41.79.in-addr.arpa name = host100-201-dynamic.41-79-r.retail.telecomitalia.it.
3) DDWrt (192.168.2.1) natting traffic to local network and web server
4) Server PC with services (192.168.2.100)
My problem is: how should I set domain name within DDWRT router configuration and on the server PC? Is this configuration correct for the pc?
/etc/hosts/
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost argo
192.168.2.100 argo.mooo.com argo
192.168.2.100 www.bonfus.it www
/etc/rc.conf
HOSTNAME="argo"
Thanks,
Pietro
Last edited by pie86 (2010-11-28 19:29:40)
Offline
Any domains that are local should point to the local IP in /etc/hosts. You should just need one line.
Something like this:
127.0.0.1 localhost.localdomain localhost argo argo.mooo.com www.bonfus.it
You don't have to put them all in there. For example, you'd only want to add 'www' if you want the www host to resolv to 127.0.0.1. I doubt you'd ever see the host www used by itself. Usually having just the short and long server hostname is enough (argo and argo.mooo.com).
I think you should have the long hostname in your /etc/rc.conf:
HOSTNAME="argo.mooo.com"
Offline
Thanks!
Offline