-
2009-04-24
apache的port和Listen - [(y)apache相关]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://wanping.blogbus.com/logs/38437213.html
今天在测试中用到了(y)apache,配置文件和端口什么都ok,hosts指的也没错,就是前端发送url,总是“该页无法显示”。显然没有走到apache服务,所以从apache的log也无法获取到有用的信息。
首先判断:
hosts是否指向指定的服务——ok,没问题,该条排除
apache是否正常启动——ok,没问题,apache正常启动,没有error信息提示
apache的配置文件端口是否是80——ok,没问题,apache使用的配置文件端口就是80
apache的80端口是否是监听状态——结果是拒绝,看来问题根源在这里。
可是为什么apache定义的80端口,却是refuse呢?找有经验的同事帮忙,原来有个配置文件指定的Listen为1119。查找apache中的listen和port的区别,相关资料记录如下:
In the absence of any Listen or BindAddress directives specifying a port number, a Port directive given in the "main server" (i.e., outside any <VirtualHost> section) sets the network port on which the server listens. If there are any Listen or BindAddress directives specifying
:numberthen Port has no effect on what address the server listens at.简言之:listen优先于port,有listen,port不起作用
随机文章:
查看磁盘信息 2009-03-26给(y)apache加压,压力上不去,问题的根源在哪里 2008-09-10Linux下如何在两台机器上建立信任关系 2008-09-08培养自己解决问题的能力 2008-09-08Linux环境下yapache配置文件路径冲突 2008-09-08
收藏到:Del.icio.us







