win7环境 xampp 配置virtualhost 问题

win7环境 xampp 配置virtualhost 问题,第1张

virtualhost配置文件修改如下: 打开localhost进入的是www.ucobub.com,配置文件如下有什么问题请帮忙指教。



1、配置文件:C:WindowsSystem32driversetchosts

# 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:xamppapacheconfextrahttpd-vhosts


# DocumentRoot 是网站文件存放的根目录

# ServerName 是网站域名, 需要跟 DNS 指向的域名一致

#


ServerAdmin [email protected]

DocumentRoot "E:xampphtdocsucenter"

ServerName www.ucobub.com

ErrorLog "logs/ucobub.com-error.log"

CustomLog "logs/ucobub.com-access.log" common



3、配置文件:E:xamppapacheconfhttpd.conf

# Virtual hosts

Include conf/extra/httpd-vhosts.conf


回复讨论(解决方案)

遇到什么问题了?

访问localhost直接指向到设置的www.ucobub.com 那个路径去了,

你没有指派 localhost 当然就是这样

谢谢楼上的赐教

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zaji/487536.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2018-06-02
下一篇 2018-06-02

发表评论

登录后才能评论

评论列表(0条)

保存