How to bind multiple website domain names in Apache2 _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Tags website domain names
How to bind multiple website domain names in Apache2. Configuration environment system: win7PHP version: 5.3.xMYSQL version: 5.0.27Apache: 2.2.4 (Win32) setting method: Open D: wampbinapacheApache2.2.17confhttpd. conf and add name1_u to configure the environment.
System: win7
PHP version: 5.3.x
MYSQL version: 5.0.27
Apache: 2.2.4 (Win32)
Setting method:
Open D: \ wamp \ bin \ apache \ Apache2.2.17 \ conf \ httpd. conf
Add at last
NameVirtualHost *: 80

DocumentRoot "D: \ wamp \ www \ bbs"
ServerName www.a.com


Note the following when configuring:
ServerName *: 80
Here, * can be changed to the local ip address, for example, 192.168.1.11.
NameVirtualHost *: 80 VirtualHost *: 80 remains unchanged
Enter 127.0.0.1 www.a.com in the hosts file.
(Hosts file location:-Windows NT/2000/XP/2003/Vista default path: % SystemRoot % \ system32 \ drivers \ etc \)
In this way, the domain name a.com is bound to the root directory of the local machine, which is equivalent to http: // localhost or
Http: // 127.0.0.1 it is convenient to enter www.a.com.

Start the apache service and access it with the above domain name

Ghost system: win7 PHP version: 5.3.x MYSQL version: 5.0.27 Apache: 2.2.4 (Win32) setting method: Open D: \ wamp \ bin \ apache \ Apache2.2.17 \ conf \ httpd. add NameVirtu...

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.