sfahey
09-24-2002, 08:57 AM
Hello group !
Hope all you lot round the world are OK, and having a cool day !!!
I have been trying to configur DNS for virtual Host
I think i'm getting someware now !!
I have included quite a lot in this post, so if there is anything more you need just ask
i am runing my server with SuSe Linux 7.2 pro, its IP is 192.168.0.1
also i have a windows box which i use to develop on its IP is 192.168.0.2
the boxes are joined via a HUB
in my SuSe control center my DNS is set to this
Host name = 'linux' domain name = 'local'
under this are the settings 'name server list' and 'domain search list'
the first 'name server list' entry is 127.0.0.1, next 2 it, and under the heading 'domain search list'
is the word 'local'
the second entre in the 'name server list' is 192.168.0.1
there is NO entry next to this in the 'domain search list'
Thats it for my DNS settings,
NOW !!
the object of this is, so i do NOT have to type http://192.168.0.1/sfahey.com/
from my win box, i just want to type http://sfahey.com
with me ? good :)
--------------------------------------------------------------------------------------------------------
this is what i have done so far with the help of my help-files and an apache server book !
part of /ect/httpd/httpd.conf
port 80
NameVirtualHost 127.0.0.1
nameVirtualHost 192.168.0.1
<VirtualHost 127.0.0.1 192.168.0.1>
ServerAdmin root@linux.local
DocumentRoot /usr/local/httpd/htdocs/
ServerName localhost
# ErrorLog var/log/httpd/iws_log
# CustomLog var/log/httpd/iws_log
</VirtualHost>
<VirtualHost 127.0.0.1 192.168.0.1>
ServerAdmin root@linux.local
DocumentRoot /usr/local/httpd/htdocs/iws.com
ServerName iws.com
# ErrorLog var/log/httpd/iws_log
# CustomLog var/log/httpd/iws_log
</VirtualHost>
<VirtualHost 127.0.0.1 192.168.0.1>
ServerAdmin root@linux.local
DocumentRoot /usr/local/httpd/htdocs/sfahey.com
ServerName sfahey.com
Options +ExecCGI +Indexes
# ErrorLog var/log/httpd/sfahey_log
# CustomLog var/log/httpd/sfahey_log
</VirtualHost>
<VirtualHost 127.0.0.1 192.168.0.1>
ServerAdmin root@linux.local
DocumentRoot /usr/local/httpd/htdocs/myphp.com
ServerName myphp.com
# ErrorLog var/log/httpd/myphp_log
# CustomLog var/log/httpd/myphp_log
</VirtualHost>
-------------------------------------------------------------------------------------------------------
thanks to 'Supa' Penguin' that worked :)
-------------------------------------------------------------------------------------------------------
now my book tells me that, for DNS with v-hosting i need a zone-file
so i have made a zone file for one of my domains, sfahey.com
this entry is in /var/named/sfahey.zone
this is my zone file
@ IN SOA sfahey.com hostmaster.sfahey.com.(
20011201001 ; Serial YYYYMMDDXXX
7200 ; refresh
3600 ; (1 hour) retry
172800 ; (20 days) expire
3600) ; (1 hr) minimum ttl
; Name Servers
IN NS ns1.sfahey.com
; CNAME for name-based virtual hosting
sfahey.com IN CNAME sfahey.com
----------------------------------------------------------------------------------------------------------
the book also says to add the following to /etc/named.conf to enable the newdomain
this is my entre
/etc/named.conf
i have included the whole file for you 2 look at
options {
# The directory statement defines the name server's
# working directory
directory "/var/named";
# The forwarders record contains a list of servers to
# which queries should be forwarded. Enable this line and
# modify the IP-address to your provider's name server.
# Up to three servers may be listed.
#forwarders { 10.11.12.13; 10.11.12.14; };
# Enable the next entry to prefer usage of the name
# server declared in the forwarders section.
#forward first;
# The listen-on record contains a list of local network
# interfaces to listen on. Optionally the port can be
# specified. Default is to listen on all interfaces found
# on your system. The default port is 53.
listen-on port 53 { 127.0.0.1; 192.168.0.1};
# The next statement may be needed if a firewall stands
# between the local server and the internet.
#query-source address * port 53;
# The allow-query record contains a list of networks or
# IP-addresses to accept and deny queries from. The
# default is to allow queries from all hosts.
#allow-query { 127.0.0.1; };
# The cleaning-interval statement defines the time interval
# in minutes for periodic cleaning. Default is 60 minutes.
# By default, all actions are logged to /var/log/messages.
cleaning-interval 120;
# Name server statistics will be logged to /var/log/messages
# every <statistics-interval> minutes. Default is 60 minutes.
# A value of 0 disables this feature.
statistics-interval 0;
# If notify is set to yes (default), notify messages are
# sent to other name servers when the the zone data is
# changed. Instead of setting a global 'notify' statement
# in the 'options' section, a separate 'notify' can be
# added to each zone definition.
notify no;
};
# The following three zone definitions don't need any modification.
# The first one defines localhost while the second defines the
# reverse lookup for localhost. The last zone "." is the
# definition of the root name servers.
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "." in {
type hint;
file "root.hint";
};
# You can insert further zone records for your own domains below.
zone "sfahey.com" IN {
type master;
file "sfahey.zone";
allow-update { none;};
};
--------------------------------------------------------------------------------------------------------
/etc/resolv.conf
not sure about this
domain local
nameserver 127.0.0.1
nameserver 192.168.0.1
search local
--------------------------------------------------------------------------------------------------------
last part of /var/log/messages
Sep 24 12:28:48 linux named[875]: starting (/etc/named.conf). named 8.2.3-REL Fri May 11 16:00:24 GMT 2001
^Iroot@ivy:/usr/src/packages/BUILD/bind8-8.2.3/bin/named
Sep 24 12:28:48 linux named[875]: /etc/named.conf:40: syntax error near '}'
Sep 24 12:28:48 linux named[875]: master zone "localhost" (IN) loaded (serial 42)
Sep 24 12:28:48 linux named[875]: master zone "0.0.127.in-addr.arpa" (IN) loaded (serial 42)
Sep 24 12:28:48 linux named[875]: hint zone "" (IN) loaded (serial 0)
Sep 24 12:28:48 linux named[875]: Zone "sfahey.com" (file sfahey.zone): No default TTL ($TTL <value>) set, using SOA minimum instead
Sep 24 12:28:48 linux named[875]: mail name "hostmaster.sfahey.com.(.sfahey.com" (owner "sfahey.com") IN (primary) is invalid - rejecting
Sep 24 12:28:48 linux named[875]: sfahey.zone:1: database naming error
Sep 24 12:28:48 linux named[875]: sfahey.zone:1: Database error near (bad name "hostmaster.sfahey.com.(.sfahey.com")
Sep 24 12:28:48 linux named[875]: sfahey.zone: Line 2: TTL > 2147483647; converted to 0
Sep 24 12:28:48 linux named[875]: sfahey.zone:2: Database error near ()
Sep 24 12:28:48 linux named[875]: sfahey.zone:3: Database error near ()
Sep 24 12:28:48 linux named[875]: sfahey.zone:4: Database error near ()
Sep 24 12:28:48 linux named[875]: sfahey.zone:5: Database error near ()
Sep 24 12:28:48 linux named[875]: sfahey.zone: Line 6: Unknown type: 3600).
Sep 24 12:28:48 linux named[875]: sfahey.zone:6: Database error near (3600))
Sep 24 12:28:48 linux named[875]: Zone "sfahey.com" (file sfahey.zone): no SOA RR found
Sep 24 12:28:48 linux named[875]: master zone "sfahey.com" (IN) rejected due to errors (serial 0)
Sep 24 12:28:48 linux named[875]: listening on [127.0.0.1].53 (lo)
Sep 24 12:28:48 linux named[875]: listening on [192.168.0.1].53 (eth0)
Sep 24 12:28:48 linux named[875]: Forwarding source address is [0.0.0.0].32768
Sep 24 12:28:48 linux named[875]: hint zone "" (IN) loaded (serial 0)
Sep 24 12:28:48 linux named[876]: group = named
Sep 24 12:28:48 linux named[876]: user = named
Sep 24 12:28:48 linux named[876]: Ready to answer queries.
Sep 24 12:28:48 linux named[876]: sysquery: sendto([198.41.0.10].53): Network is unreachable
Sep 24 12:39:24 linux named[876]: ns_forw: sendto([198.41.0.10].53): Network is unreachable
Sep 24 12:54:24 linux named[876]: ns_forw: sendto([198.41.0.10].53): Network is unreachable
Sep 24 12:59:00 linux /USR/SBIN/CRON[1125]: (root) CMD ( rm -f /var/spool/cron/lastrun/cron.hourly)
Sep 24 13:09:24 linux named[876]: ns_forw: sendto([198.41.0.10].53): Network is unreachable
-----------------------------------------------------------------------------------------------------------
so you lot, this is where i am stuck, i need some help here, what is this message log telling me ?
big stuck
can anybody help
sorry this is a bit long, but i figure that its best to include a lot, rather than you thinking
we need more nfo.
------------------------------------------------------------------------------------------------------------
thank you from the UK
have a nice day !!
Shaun
Hope all you lot round the world are OK, and having a cool day !!!
I have been trying to configur DNS for virtual Host
I think i'm getting someware now !!
I have included quite a lot in this post, so if there is anything more you need just ask
i am runing my server with SuSe Linux 7.2 pro, its IP is 192.168.0.1
also i have a windows box which i use to develop on its IP is 192.168.0.2
the boxes are joined via a HUB
in my SuSe control center my DNS is set to this
Host name = 'linux' domain name = 'local'
under this are the settings 'name server list' and 'domain search list'
the first 'name server list' entry is 127.0.0.1, next 2 it, and under the heading 'domain search list'
is the word 'local'
the second entre in the 'name server list' is 192.168.0.1
there is NO entry next to this in the 'domain search list'
Thats it for my DNS settings,
NOW !!
the object of this is, so i do NOT have to type http://192.168.0.1/sfahey.com/
from my win box, i just want to type http://sfahey.com
with me ? good :)
--------------------------------------------------------------------------------------------------------
this is what i have done so far with the help of my help-files and an apache server book !
part of /ect/httpd/httpd.conf
port 80
NameVirtualHost 127.0.0.1
nameVirtualHost 192.168.0.1
<VirtualHost 127.0.0.1 192.168.0.1>
ServerAdmin root@linux.local
DocumentRoot /usr/local/httpd/htdocs/
ServerName localhost
# ErrorLog var/log/httpd/iws_log
# CustomLog var/log/httpd/iws_log
</VirtualHost>
<VirtualHost 127.0.0.1 192.168.0.1>
ServerAdmin root@linux.local
DocumentRoot /usr/local/httpd/htdocs/iws.com
ServerName iws.com
# ErrorLog var/log/httpd/iws_log
# CustomLog var/log/httpd/iws_log
</VirtualHost>
<VirtualHost 127.0.0.1 192.168.0.1>
ServerAdmin root@linux.local
DocumentRoot /usr/local/httpd/htdocs/sfahey.com
ServerName sfahey.com
Options +ExecCGI +Indexes
# ErrorLog var/log/httpd/sfahey_log
# CustomLog var/log/httpd/sfahey_log
</VirtualHost>
<VirtualHost 127.0.0.1 192.168.0.1>
ServerAdmin root@linux.local
DocumentRoot /usr/local/httpd/htdocs/myphp.com
ServerName myphp.com
# ErrorLog var/log/httpd/myphp_log
# CustomLog var/log/httpd/myphp_log
</VirtualHost>
-------------------------------------------------------------------------------------------------------
thanks to 'Supa' Penguin' that worked :)
-------------------------------------------------------------------------------------------------------
now my book tells me that, for DNS with v-hosting i need a zone-file
so i have made a zone file for one of my domains, sfahey.com
this entry is in /var/named/sfahey.zone
this is my zone file
@ IN SOA sfahey.com hostmaster.sfahey.com.(
20011201001 ; Serial YYYYMMDDXXX
7200 ; refresh
3600 ; (1 hour) retry
172800 ; (20 days) expire
3600) ; (1 hr) minimum ttl
; Name Servers
IN NS ns1.sfahey.com
; CNAME for name-based virtual hosting
sfahey.com IN CNAME sfahey.com
----------------------------------------------------------------------------------------------------------
the book also says to add the following to /etc/named.conf to enable the newdomain
this is my entre
/etc/named.conf
i have included the whole file for you 2 look at
options {
# The directory statement defines the name server's
# working directory
directory "/var/named";
# The forwarders record contains a list of servers to
# which queries should be forwarded. Enable this line and
# modify the IP-address to your provider's name server.
# Up to three servers may be listed.
#forwarders { 10.11.12.13; 10.11.12.14; };
# Enable the next entry to prefer usage of the name
# server declared in the forwarders section.
#forward first;
# The listen-on record contains a list of local network
# interfaces to listen on. Optionally the port can be
# specified. Default is to listen on all interfaces found
# on your system. The default port is 53.
listen-on port 53 { 127.0.0.1; 192.168.0.1};
# The next statement may be needed if a firewall stands
# between the local server and the internet.
#query-source address * port 53;
# The allow-query record contains a list of networks or
# IP-addresses to accept and deny queries from. The
# default is to allow queries from all hosts.
#allow-query { 127.0.0.1; };
# The cleaning-interval statement defines the time interval
# in minutes for periodic cleaning. Default is 60 minutes.
# By default, all actions are logged to /var/log/messages.
cleaning-interval 120;
# Name server statistics will be logged to /var/log/messages
# every <statistics-interval> minutes. Default is 60 minutes.
# A value of 0 disables this feature.
statistics-interval 0;
# If notify is set to yes (default), notify messages are
# sent to other name servers when the the zone data is
# changed. Instead of setting a global 'notify' statement
# in the 'options' section, a separate 'notify' can be
# added to each zone definition.
notify no;
};
# The following three zone definitions don't need any modification.
# The first one defines localhost while the second defines the
# reverse lookup for localhost. The last zone "." is the
# definition of the root name servers.
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "." in {
type hint;
file "root.hint";
};
# You can insert further zone records for your own domains below.
zone "sfahey.com" IN {
type master;
file "sfahey.zone";
allow-update { none;};
};
--------------------------------------------------------------------------------------------------------
/etc/resolv.conf
not sure about this
domain local
nameserver 127.0.0.1
nameserver 192.168.0.1
search local
--------------------------------------------------------------------------------------------------------
last part of /var/log/messages
Sep 24 12:28:48 linux named[875]: starting (/etc/named.conf). named 8.2.3-REL Fri May 11 16:00:24 GMT 2001
^Iroot@ivy:/usr/src/packages/BUILD/bind8-8.2.3/bin/named
Sep 24 12:28:48 linux named[875]: /etc/named.conf:40: syntax error near '}'
Sep 24 12:28:48 linux named[875]: master zone "localhost" (IN) loaded (serial 42)
Sep 24 12:28:48 linux named[875]: master zone "0.0.127.in-addr.arpa" (IN) loaded (serial 42)
Sep 24 12:28:48 linux named[875]: hint zone "" (IN) loaded (serial 0)
Sep 24 12:28:48 linux named[875]: Zone "sfahey.com" (file sfahey.zone): No default TTL ($TTL <value>) set, using SOA minimum instead
Sep 24 12:28:48 linux named[875]: mail name "hostmaster.sfahey.com.(.sfahey.com" (owner "sfahey.com") IN (primary) is invalid - rejecting
Sep 24 12:28:48 linux named[875]: sfahey.zone:1: database naming error
Sep 24 12:28:48 linux named[875]: sfahey.zone:1: Database error near (bad name "hostmaster.sfahey.com.(.sfahey.com")
Sep 24 12:28:48 linux named[875]: sfahey.zone: Line 2: TTL > 2147483647; converted to 0
Sep 24 12:28:48 linux named[875]: sfahey.zone:2: Database error near ()
Sep 24 12:28:48 linux named[875]: sfahey.zone:3: Database error near ()
Sep 24 12:28:48 linux named[875]: sfahey.zone:4: Database error near ()
Sep 24 12:28:48 linux named[875]: sfahey.zone:5: Database error near ()
Sep 24 12:28:48 linux named[875]: sfahey.zone: Line 6: Unknown type: 3600).
Sep 24 12:28:48 linux named[875]: sfahey.zone:6: Database error near (3600))
Sep 24 12:28:48 linux named[875]: Zone "sfahey.com" (file sfahey.zone): no SOA RR found
Sep 24 12:28:48 linux named[875]: master zone "sfahey.com" (IN) rejected due to errors (serial 0)
Sep 24 12:28:48 linux named[875]: listening on [127.0.0.1].53 (lo)
Sep 24 12:28:48 linux named[875]: listening on [192.168.0.1].53 (eth0)
Sep 24 12:28:48 linux named[875]: Forwarding source address is [0.0.0.0].32768
Sep 24 12:28:48 linux named[875]: hint zone "" (IN) loaded (serial 0)
Sep 24 12:28:48 linux named[876]: group = named
Sep 24 12:28:48 linux named[876]: user = named
Sep 24 12:28:48 linux named[876]: Ready to answer queries.
Sep 24 12:28:48 linux named[876]: sysquery: sendto([198.41.0.10].53): Network is unreachable
Sep 24 12:39:24 linux named[876]: ns_forw: sendto([198.41.0.10].53): Network is unreachable
Sep 24 12:54:24 linux named[876]: ns_forw: sendto([198.41.0.10].53): Network is unreachable
Sep 24 12:59:00 linux /USR/SBIN/CRON[1125]: (root) CMD ( rm -f /var/spool/cron/lastrun/cron.hourly)
Sep 24 13:09:24 linux named[876]: ns_forw: sendto([198.41.0.10].53): Network is unreachable
-----------------------------------------------------------------------------------------------------------
so you lot, this is where i am stuck, i need some help here, what is this message log telling me ?
big stuck
can anybody help
sorry this is a bit long, but i figure that its best to include a lot, rather than you thinking
we need more nfo.
------------------------------------------------------------------------------------------------------------
thank you from the UK
have a nice day !!
Shaun