Rumah > pembangunan bahagian belakang > tutorial php > win7环境 xampp 配置virtualhost 问题

win7环境 xampp 配置virtualhost 问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Lepaskan: 2016-06-23 14:39:57
asal
1064 orang telah melayarinya

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直接指向到设置的www.ucobub.com 那个路径去了,

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

谢谢楼上的赐教

Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan