to LeeMaRS(小菜虎): 我把server name改为了 ServerName http://61.171.35.186(是我现在的ip) 然后save,重新启动apache服务,可是问题依旧 只有在我把 BindAddress 127.0.0.1 改为 BindAddress 61.171.35.186后终于可以了。由这上面的注释: # # BindAddress: You can support virtual hosts with this option. This directive # is used to tell the server which IP address to listen to. It can either # contain "*", an IP address, or a fully qualified Internet domain name. # See also the <VirtualHost> and Listen directives. # 这是apache监听的ip!?
错误提示为:
该页无法显示
您要查看的页当前不可用。Web 站点可能遇到技术问题,或者您需要调整浏览器设置。 我估计是apache设置有问题吧。因为我看到过这样一段话:
“
在安装的时候,Apache会提示你输入服务器名等,其实都不重要的。因为这些可以后来再改的,哈哈。
最重要的,是修改CONF目录下的HTTPD.CONF文件:
Servername xxxxxx 改为 Servername localhost
******************************************************************************************
注意:因为Apache的问题,这样设置后,很多程序就只能自己运行,而不能上网给别人运行。太可惜了……
建议大家都申请一个像DNS2Go的动态域名!
”
而我的httpd.conf内的servername就是localhost。
kkk2kkk(kkk2kkk 你的机器apache设置是什么呢?能说一下吗?
我来说说吧.
那篇文章我写了很久了,以前有很多认识不到的地方.如果访问 http://你的IP/目录
apache收到请求后 会把URL解析到你所设的servername 也就是localhost
那客户方肯定会失败了.要改成 http://你的IP/目录/
才能正常访问.另外.这个问题在直接访问文件的时候不存在.
我把server name改为了
ServerName http://61.171.35.186(是我现在的ip)
然后save,重新启动apache服务,可是问题依旧
只有在我把
BindAddress 127.0.0.1
改为
BindAddress 61.171.35.186后终于可以了。由这上面的注释:
#
# BindAddress: You can support virtual hosts with this option. This directive
# is used to tell the server which IP address to listen to. It can either
# contain "*", an IP address, or a fully qualified Internet domain name.
# See also the <VirtualHost> and Listen directives.
#
这是apache监听的ip!?
61.171.35.186可以,本地127.0.0.1可以。
真奇怪,刚才进行这种设置的时候不能成功,而现在却好了,不清楚怎么回事。
又不行了
好象127.0.0.1与61.171.35.186不能同时成功
那么是不是说在本地调试的话必须改为localhost呢?