Apache virtual directory and multi-port multiple host name configuration

Source: Internet
Author: User

about Apache

Apache http Server is an outstanding representative of open source software projects, providing web browsing services based on standard HTTP network protocols, in the WAB The server sector has maintained over half of its share over the long term. Apache servers can run on Linux,UNIX,Windows multiple operating system platforms.

Experimental Purpose: Create a virtual directory and build a multi-site (virtual host)

Lab Environment: Linux6.5 System,IP Address:192.168.100.10

since the The Apache httpd Service on the Linux6.5 system has been installed, and the configuration file can be changed directly to start the service.

1. change the httpd configuration file,

Vi/etc/httpd/conf/httpd.conf

Listen 192.168.100.10:80

#Listen 80

ServerName www.benet.com:80

2. start the httpd service.

3 test with host

4. echo "This is Apache test" >/var/www/html/index.html

One, Create a virtual directory


1. first do not turn on the authentication test.


Create a default home page store directory,


Test virtual directory with host : 192.168.100.10/test/

2 turn on the identity verification test.

Create a zhangsa user and restart the httpd service

In the host test

Two building multi-site (virtual host)

1 same IP same Port different host name benet and ACCP

edit vi/etc/named.conf configuration file

creating benet and ACCP directories

Install the bind package

Change The main configuration file for bind vi/etc/named.conf

Change The Zone profile for bind vi/etc/named.rfc1912.zones

Change The Zone data profile for bind

start The bind service and test the parsing

restart httpd service

Apache virtual directory and multi-port multiple host name configuration

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.