Please help me. I'm so angry. _ use apache to set up a VM.

Source: Internet
Author: User
Tags website server mail exchange
Please help me quickly. Use apache to set up a VM-Linux Enterprise Application-Linux server application. For details, refer to the following. The specific process is as follows:

Since I got away from IIS and used Apache2.0. I fell in love with it, and thought about it day and night. Later, I was confused about the website, and the website needed many categories. In the past, I used IIS to directly enter the host header in the graphical interface, and then adjusted the Host Header (A) value in DNS settings. Now I want to use Apache, I want to create a website server with a single ip address and multiple domain names like IIS, but I won't do it myself ~ As a result, I found a lot of articles on the Internet ......

After reading more than N Articles, I can't help but feel that it seems that all articles are apache 1.3, and there are a lot of consistent articles.
After reading a large number of articles published by google Baidu, an apache2.0 Vm with a single ip address and multiple domain names is designed as follows:

1. On the DNS resolution Management page, set the following information:
Host Name (A) the IP address to be resolved TTL
Aaa.xxx.com 168.168.168.168 3600
Bbb.xxx.com 168.168.168.168 3600
Ccc.xxx.com 168.168.168.168 3600
......
Nnn.xxx.com 168.168.168.168 3600
[Add A new A record] [submit]

Alias (CNAME) alias host TTL
(The younger brother is confused here. He has never used it before and has never entered anything)
[Add a new alias] [submit]

Mail exchange Record (MX) destination host priority TTL
(Nothing is added)
[Add new email records] [submit]

2. Configure the httpd. conf file in apache on the host.
The configuration is as follows:
NameVirtualHost 168.168.168.168: 80


ServerName aaa.xxx.com
DirectoryIndex index.html
DocumentRoot "/www/site1"



ServerName bbb.xxx.com
DirectoryIndex index.html
DocumentRoot "/www/site2"



ServerName ccc.xxx.com
DirectoryIndex index.html
DocumentRoot "/www/site3"



ServerName nnn.xxx.com
DirectoryIndex index.html
DocumentRoot "/www/siteN"


3. After the configuration is complete, enter the domain name for testing. The result is dumb-all the sites can only point to aaa.xxx.com. Even if you access nnn.xxx.com, only aaa.xxx.com is displayed. Depressed ......

Where is the problem? CNAME yes? If this is an error, how can I configure it? Or is my previous configuration incorrect?

[ This post was last edited by qingcao 998539]
Related Article

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.