If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. ** If you are logged in, most ads will not be displayed. **

name based virtual hosting

i want to configure name based virtual hosting.
suppose my ip address is 100.101.102.103
i would like to have 3 websites on the same ip.www.abc.comwww.xyz.comwww.efg.com
the default directory is /var/www/html. what are the changes i need to do in the /etc/named.conf and /var/named/<forward-zone> and /var/named/<reverse-zone> files ?

i have pasted concerned lines of my httpd.conf file. what modifications i need to do in this file ?

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

here is a very simplified config. The first vhost deny's access to anything not specifically listed below it. I would use that. Then you of course need your DNS records for domain abc, xyz and efg to point to the correct IP addy. This config assumes that www.abc.com will be placed in /abc under html. If not adjust name / location accordinagly. If /abc is above the html directory, you may need to configure Alias to it. Hope this helps.

following is the concerned lines of my httpd.conf
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#

IN NS server.sarayu3.com.
IN A 192.168.1.3
www IN CNAME server.sarayu3.com.www.server.sarayu2.com. IN A 192.168.1.3
-------------------------------------------# cat /var/named/chroot/var/named/1.168.192.in-addr.arpa.zone

3 IN PTR server.sarayu2.com.
-----------------------------------------------------------
following is the changes i have made to named.conf
zone "server.sarayu3.com" IN {
type master;
file "server.sarayu3.com.zone";
allow-update { none; };
};

zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa.zone";
allow-update { none; };
};
---------------------------------------------------------http://server.sarayu3.com is working but http://server.sarayu2.com is not working. where i am wrong ? pliz help