apache 本地虚拟主机的一个问题求助
时间:2009-05-03
来源:互联网
<VirtualHost 127.0.0.3:80>
DocumentRoot e:/www/zf
ServerName 127.0.0.3:80
</VirtualHost>
以上可以用实现http://127.0.0.2
但要是把127.0.0.3:80换成abc后,
用http://abc就不能用,直接访问网上的去了。
请问怎么解决?
DocumentRoot e:/www/zf
ServerName 127.0.0.3:80
</VirtualHost>
以上可以用实现http://127.0.0.2
但要是把127.0.0.3:80换成abc后,
用http://abc就不能用,直接访问网上的去了。
请问怎么解决?
作者: shgen 发布时间: 2009-05-03
访问hosts文件,路径一般是C:\Windows\System32\drivers\etc\hosts
修改成
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 abc
即可
修改成
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 abc
即可
作者: microwind 发布时间: 2009-05-03
NameVirtualHost *:80
##################### ks ########################
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot d:/haha/
ServerName www.123.test
</VirtualHost>
alias /haha "d:/haha/"
<Directory "d:/haha/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
##################### ks ########################
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot d:/haha/
ServerName www.123.test
</VirtualHost>
alias /haha "d:/haha/"
<Directory "d:/haha/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
作者: boris11201217 发布时间: 2009-11-16
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28