The Apache virtual Host configuration process

Source: Internet
Author: User

The Apache virtual host configuration process has three kinds: ip-based, port based, domain based

This is done on the Red Hat 5.8 system, first mount the CD, configure the Yum library, install the development environment

Mkdir/mnt/cdrom

Mount/dev/cdrom/mnt/cdrom

Vim/etc/yum.reps.d/server.repo

[Base]

Name=server

Baseurl=file:///mnt/cdrom/server

Enabled=1

Gpgcheck=0

Yum Groupinstall "Development Libraries" –y (generally to install two, but Development tools are installed by default, so here only need to install one on it)

Install HTTPD Package

Yum List all | grep httpd

Prepare for work: To determine if SELinux is turned off before starting, to cancel the central host

1. Close SELinux

Setenforce 0

See if closing

Getenforce

2, cancel the center host

Vim/etc/httpd/conf/httpd.conf

3, edit a new configuration file, management is also more convenient, we first do an ip-based virtual host

Vim/etc/httpd/conf.d/virtual.conf

4, new two directories, and in their respective directories to create a new document, and edit

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.