xampp 配置虚拟主机 第一步:在apache/conf/extra/httpd-vhosts.conf中添加虚拟主机配置 :如
serveradmin a@a.com
documentroot e:/phpproj/test
servername test.com
serveralias www.test.com
errorlog logs/test-error.log
customlog logs/test-access.log combined
可添加多个
serveradmin a@a.com
documentroot e:/phpproj/aa
servername aa.com
serveralias www.aa.com
errorlog logs/aa-error.log
customlog logs/aa-access.log combined
第二步:在apache/conf/httpd.conf中把
省略....
改成
options followsymlinks
allowoverride none
order deny,allow
allow from all
第三步修改hosts文件
127.0.0.1 test.com www.test.com
127.0.0.1 aa.com www.aa.com
ok完成
以上就介绍了xampp配置虚拟主机,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
