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...