Domain Hosting Configuration

[root@localhost named]# vim /var/named/chroot/etc/named.conf
options{ directory "/var/named"; };
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};
zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

zone "gix.com" IN {
        type master;
        file tsbd.fz";
        allow-update { none; };
};

zone "50.168.192.in-addr.arpa" IN {
        type master;
        file "tsbd.rz";
        allow-update { none; };
};

zone "chsaiful.com" IN {
        type master;
        file "chsaiful.fz";
        allow-update { none; };
};

[root@dns1 ~]# cp /var/named/chroot/var/named/tsbd.fz chsaiful.fz
[root@dns1 ~]# chgrp named /var/named/chroot/var/named/chsaiful.fz

[root@ns1 html]# cd /var/www/html/
[root@ns1 html]# ls
index.html  squint  tsbd
[root@ns1 html]# mkdir chsaiful
[root@ns1 html]# ls
chsaiful  index.html  squint  tsbd
[root@ns1 html]# cd chsaiful/
[root@ns1 chsaiful]# vim index.html

HELLO THIS IS VIRTUAL HOSTING
[root@ns1 cric]# vim /etc/httpd/conf/httpd.conf 
NameVirtualHost 192.168.50.20:80
<VirtualHost www.chsaiful.com:80>
    ServerAdmin webmaster@ns1.chsaiful.com
    DocumentRoot /var/www/html/chsaiful
    ServerName www.chsaiful.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

[root@ns1 home]# /etc/init.d/named restart
Stopping named: .                                           [  OK  ]
Starting named:                                                [  OK  ]

[root@ns1 /]# /etc/init.d/httpd restart
Stopping httpd:                                                 [  OK  ]
Starting httpd:                                                    [  OK  ]