PHP local through mapping, for multi-domain access
First step: First in the C drive under the Windows/system32/drivers/etc/hosts file Plus
127.0.0.1 localhost
127.0.0.1 Test
127.0.0.1 www.weishang.com
Step two: Conf/extra/httpd-vhosts.conf under Apache's server
Add the above code:
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "e:/wamp/www/"
ServerName localhost
Serveralias localhost
Errorlog "Logs/dummy-host.localhost-error.log"
Customlog "Logs/dummy-host.localhost-access.log" combined
</VirtualHost>
<virtualhost *:80>
ServerAdmin [email protected]Test
? DocumentRoot "e:/wamp/www/weishang/mobile/"
ServerNameTest
ServeraliasTest
Errorlog "Logs/dummy-host.Test-error.log "
Customlog "Logs/dummy-host.Test-access.log "combined
</VirtualHost>
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "e:/wamp/www/weishang/mobile/"
ServerName www.weishang.com
Serveralias www.weishang.com
Errorlog "Logs/dummy-host.www.weishang.com-error.log"
Customlog "Logs/dummy-host.www.weishang.com-access.log" combined
</VirtualHost>
Step three: Find it in the apache/conf/httpd.conf file.
Include conf/extra/httpd-vhosts.conf and Open
Then restart the Apache server
Reference: http://jingyan.baidu.com/article/154b46315e76af28ca8f4135.html
http://hi.baidu.com/baiping588
PHP local through mapping, for multi-domain access