WEB server configuration instance on RedHat5.4

Source: Internet
Author: User
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

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.