win7环境 xampp 配置virtualhost 问题
virtualhost配置文件修改如下: 打开localhost进入的是www.ucobub.com,配置文件如下有什么问题请帮忙指教。
1、配置文件:c:\windows\system32\drivers\etc\hosts
# localhost name resolution is handled within dns itself.
127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
127.0.0.1 www.ucobub.com
2、配置文件 :e:\xampp\apache\conf\extra\httpd-vhosts
# documentroot 是网站文件存放的根目录
# servername 是网站域名, 需要跟 dns 指向的域名一致
#
serveradmin webmaster@dummy-host.example.com
documentroot e:\xampp\htdocs\ucenter
servername www.ucobub.com
errorlog logs/ucobub.com-error.log
customlog logs/ucobub.com-access.log common
3、配置文件:e:\xampp\apache\conf\httpd.conf
# virtual hosts
include conf/extra/httpd-vhosts.conf
分享到: 更多
------解决方案--------------------
你没有指派 localhost 当然就是这样