Configure DNS and virtual hosts in RH9.0

Source: Internet
Author: User
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
  
# Vi/usr/local/apache/conf/httpd. conf
  
ServerName 169.254.1.189
NameVirtualHost 169.254.1.189
  
ServerName ftp.zzvcom.com
DocumentRoot/www/ftp
TransferLog logs/ftp_access_log
  
  
  
ServerName mail.zzvcom.com
DocumentRoot/www/mail
TransferLog logs/mail_access_log
  
  
  
ServerName kuanping.zzvcom.com
DocumentRoot/www/kuanping
TransferLog logs/kuanping_access_log
  
  
  
ServerName soft.zzvcom.com
DocumentRoot/www/soft
TransferLog logs/soft_access_log
  
  
  
ServerName xiaoshou.zzvcom.com
DocumentRoot/www/xiaoshou
TransferLog logs/xiaoshou_access_log
  
  
  
ServerName cpzz.zzvcom.com
DocumentRoot/www/cpzz
TransferLog logs/cpzz_access_log
  
  
  
ServerName net.zzvcom.com
DocumentRoot/www/net
TransferLog logs/net_access_log
  
  
  
ServerName yanfa.zzvcom.com
DocumentRoot/www/yanfa
TransferLog logs/yanfa_access_log
  
  
# 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.
  
#/Usr/local/apache/bin/apachectl configtest
#/Usr/local/apache/bin/httpd-S
  
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.
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.