funeralcrasher: (Default)
funeralcrasher ([personal profile] funeralcrasher) wrote2006-05-29 01:57 pm

Another vhost question

Going back to my two sites, "fu" and "bar" for a moment..

Should an entry be added in /etc/hosts for each, so that when another PC on the network types in http://fu they will be taken to the fu web content? Or am I confusing hosts with DNS?

[identity profile] darkvervain.livejournal.com 2006-05-29 09:52 pm (UTC)(link)
You will definitely need DNS.

If, say, fu.mydomain.com and bar.mydomain.com have the same IP (basically the web address), apache will know which content to serve based on the hostname the user typed in to get there, and looks it up in the ServerName entry for that VHOST.

Putting it in /etc/hosts won't matter, since it's all based on the DNS.

[identity profile] pkbarbiedoll.livejournal.com 2006-05-30 12:38 am (UTC)(link)
Are you familiar with Bind? I only need fu and bar to be live on my intranet. Most of the examples I see include something like fu.com.. I'd like to set it up so DNS recognizes just fu. Make sense?

Errors in my system log:

May 29 16:08:21 Talon named[22334]: listening on IPv4 interface eth0, 192.168.1.102#53
May 29 16:08:21 Talon named[22334]: command channel listening on 127.0.0.1#953
May 29 16:08:21 Talon named[22334]: command channel listening on ::1#953
May 29 16:08:21 Talon named[22334]: zone 0.0.127.in-addr.arpa/IN: loaded serial 42
May 29 16:08:21 Talon named[22334]: dns_rdata_fromtext: master/1.168.192.in-addr.arpa:2: near '@.': bad nam        e (check-names)
May 29 16:08:21 Talon named[22334]: zone 1.168.192.in-addr.arpa/IN: loading master file master/1.168.192.in        -addr.arpa: bad name (check-names)
May 29 16:08:21 Talon named[22334]: zone localhost/IN: loaded serial 42
May 29 16:08:21 Talon named[22334]: dns_rdata_fromtext: master/talon:2: near '@.': bad name (check-names)
May 29 16:08:21 Talon named[22334]: zone talon/IN: loading master file master/talon: bad name (check-names)
May 29 16:08:21 Talon named[22334]: running

[identity profile] darkvervain.livejournal.com 2006-05-31 06:39 pm (UTC)(link)
What version of BIND? And what does your reverse name lookup file look like?

[identity profile] pkbarbiedoll.livejournal.com 2006-05-31 07:46 pm (UTC)(link)
I'm using BIND version 9.3.1-8.

Here are my master/talon files:

My zone is named "talon".

Talon:/etc/named.d # more /var/lib/named/master/talon

====================================
$TTL 3d
@ IN SOA @. root.@. (
2006052900 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ) ; minimum

talon. IN NS georgiaoffroad.talon.
georgiaoffroad IN A 192.168.1.102
techman IN A 192.168.1.102

====================================

Talon:/etc/named.d # more /var/lib/named/master/1.168.192.in-addr.arpa

====================================
$TTL 3d
@ IN SOA @. root.@. (
2006052900 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ) ; minimum

1.168.192.in-addr.arpa. IN NS georgiaoffroad.talon.
102.1.168.192.in-addr.arpa. IN PTR georgiaoffroad.talon.
102.1.168.192.in-addr.arpa. IN PTR techman.talon.
====================================

[identity profile] darkvervain.livejournal.com 2006-05-31 11:26 pm (UTC)(link)
It doesn't like the @ IN SOA @. root.@. ( line at all.

Try expanding the '@' on the line to the domain name and see if that helps.


[identity profile] darkvervain.livejournal.com 2006-05-31 11:30 pm (UTC)(link)
try:

@ IN SOA georgiaoffroad.talon. root.georgiaoffroad.talon. (
2006052900 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ) ; minimum


See if that helps?
(Replace the SOA record in both files and do a rndc reload)

[identity profile] pkbarbiedoll.livejournal.com 2006-06-01 02:40 am (UTC)(link)
I'm not sure I follow what you mean by expand.

[identity profile] darkvervain.livejournal.com 2006-06-01 06:16 am (UTC)(link)
The '@' is a placeholder for the domain itself, but for some reason it seems to have problems with it. :(