The main site: www. abc. comip: 192.168.1.106 anyone can see the marketing department: mkt. abc. comip: 192.168.1.106. do not view the site at 192.168.1.115, and only allow users: code, anys. Visible Technical Department: tec.abc.com
Requirements
Main Site: www.abc.com ip: 192.168.1.106 visible to anyone
Marketing Department: mkt.abc.com ip: 192.168.1.106 prohibit viewing of 192.168.1.115, and only allow users: code, anys, visible
Technical Department: tec.abc.com ip: 192.168.1.106 all users use https connection
Instance decomposition:
Device:
Virtual Machine: virtualbox
RedHat 5.4 ip: 192.168.1.96
Windows 2003 ip: 192.168.1.117
1. Configure the yum source to facilitate software installation
2. Configure the DNS server to resolve the Domain Name
3. Use a VM Based on the Host Header for Domain Name Search
1> Configure the domain name www.abc.com Virtual Host
2> Configure the domain name mkt.abc.com Virtual Host
3> Configure the domain name tec.abc.com Virtual Host
Code Configuration
1. Configure the yum source to facilitate software installation
1> attach a cd
[Root @ localhost cdrom] # mount-o-loop/dev/cdrom/mnt/cdrom
[Root @ localhost yum. repos. d] # cd/etc/yum. repos. d/
[Root @ localhost yum. repos. d] # cp-p rhel-debuginfo.repo cdrom. repo
[Root @ localhost yum. repos. d] # vi cdrom. repo
Update the yum source after configuration.
[Root @ localhost yum. repos. d] # yum update
2. Configure the DNS server to resolve the Domain Name
1> install three files
[Root @ localhost ~] # Yum install bind
[Root @ localhost ~] # Yum install caching-nameserver
[Root @ localhost ~] # Yum install bind-chroot
2> Configure the abc.com Scope
Go to the configuration directory and create the global configuration file named. conf.
[Root @ localhost ~] # Cd/var/named/chroot/etc/
[Root @ localhost etc] # cp-p named. caching-nameserver.conf named. conf
[Root @ localhost etc] # vi named. conf
Modify the following content:
3> Create an abc.com Scope
Modify the main configuration file named. rfc1912.zones and add the scope to it.
[Root @ localhost etc] # vi named. rfc1912.zones
4> go to the region configuration file directory and create the abc.com. zone region configuration file.
[Root @ localhost etc] # cd ../var/named/
[Root @ localhost named] # cp-p localdomain. zone abc.com. zone