Configuring the Environment
System: Win7
PHP Version: 5.3.x
MYSQL version: 5.0.27
apache:2.2.4 (WIN32)
Setup method:
Open D:\wamp\bin\apache\Apache2.2.17\conf\httpd.conf
At the end of the add
Namevirtualhost *:80
DocumentRoot "D:\wamp\www\bbs"
ServerName www.a.com
The configuration should be noted:
ServerName *:80
The * can be changed to native IP such as 192.168.1.11
Namevirtualhost *:80 VirtualHost *:80 remain intact
In the Hosts file, write a sentence: 127.0.0.1 www.a.com
(Hosts file location:-Windows nt/2000/xp/2003/vista default path:%systemroot%\system32\drivers\etc\)
In this way, the domain name a.com is tied to the native root directory, which is equivalent to http://localhost or
http://127.0.0.1 input www.a.com more convenient AH.
Launch Apache service, access with above domain name
The above describes the Apache and PHP installation APACHE2 implementation of multi-site domain name binding, including the Apache and PHP installation aspects, I hope to be interested in PHP tutorial friends helpful.