Article title: DNS and virtual host configuration under RH9.0. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Configure several simple virtual hosts. the DNS server IP address is 169.254.1.189. for example, the domain name of our company is zzvcom.com. I want to configure the following servers:
Ftp.zzvcom.com, mail.zzvcom.com, kuanping.zzvcom.com, soft.zzvcom.com,
Xiaoshou.zzvcom.com, cpzz.zzvcom.com, net.zzvcom.com, and yanfa.zzvcom.com.
Install rpm software named, and then download apache.tar.gz
# Tar? Zxvf apache.tar.gz
# Cd apache
#./Configure? Prefix =/usr/local/apache
# Make; make install; make clean
# Mkdir/www
# Cd/www
# Mkdir ftp mail soft xiaoshou net yanfa cpzz kuanping
Put each primary page (index.html) in the/www/ftp/www/mail/www/soft/www/xiaoshou/www/net/www/yanfa/www/kuanping/www/cpzz, respectively ), and set its attribute to 755.
If everything is OK, you can run the following command (start apache)
#/Usr/local/apache/bin/apachectl start
# Vi/etc/named. conf
Add the following lines at the end
Zone "1.254.169.in-addr. arpa" in {
Type master;
File "db.1.254.169 ";
Allow-update {none ;};
};
Zone "zzvcom.com "{
Type master;
File "zzvcom. coms ";
Allow-update {none ;};
};
# Vi/var/named/db.1.254.169
@ In soa localhost. root. localhost .(
1997022700; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns localhost.
1 in ptr localhost.
189 in ptr ftp.zzvcom.com
# Vi/var/named/zzvcom. coms
@ In soa dns.zzvcom.com. root.zzvcom.com .(
947579188; Serial Number
10800; Refresh after 3 hours
3600; Retry after 1 hour
604800; Expire after 1 week
86400); Minimum TTL of 1 day
@ In ns dns.zzvcom.com.
Localhost in a 127.0.0.1
Ftp in a 169.254.1.189
Mail in cname ftp
Kuanping in cname ftp
Xiaoshou in cname ftp
Net in cname ftp
Soft in cname ftp
Yanfa in cname ftp
Cpzz in cname ftp
# Vi/etc/resolv. conf
Domain zzvcom.com
Nameserver 169.254.1.189
#/Etc/rc. d/init. d/named start
Use nslookup to verify DNS correctness
Set DNS to 169.254.1.189 on our client (in WINDOWS) (as long as this one is used, because our DNS server is not a public IP and has not been applied for a DNS server)
Open the ftp.zzvcom.com soft.zzvcom.com in IE. if it is correct, all the experiments will be successful.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.