Linux builds domain-based virtual hosts

Source: Internet
Author: User

building a domain-based virtual host

1. first, set up a DNS server for two sites and create a new zone, respectively: www.benet.com and www.accp.com

1) Modify the configuration file

2) modifying data files

2) Restart the DNS service

2. Build Two websites

1) Prepare the Web page


2 ) Open the virtual host profile and modify the configuration file

Add the following content


3) Modify the master profile to enable the virtual host

Vi/usr/local/httpd/conf/httpd.conf

Remove the previous # number

4) restarting the httpd service

5) Accessing the virtual Web host on the client


So far, domain-based virtual hosting has been built.

!!! Note: If you cannot access it on the client, it may be that the server's firewall is open or not, or the DNS service is not restarted, or the httpd Service may not be restarted.


Linux builds domain-based virtual hosts

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.