apache服务器常见报错问题

Posted by Jeffery Yee | 1:26 PM

apache服务器常见报错问题
多个站点的定义如下
#NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for s without a known
# server name.
#
NameVirtualHost 127.0.0.1:80
 代码如下复制代码
<VirtualHost 127.0.0.1:80>
ServerAdmin devgg@devgg.com
DocumentRoot /usr/local/tomcat/webap/ronglian
ServerName www.hzhuti.com
ErrorLog logs/ronglian.com-error_log
CustomLog logs/ronglian.com-access_log common
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerAdmin devgg@devgg.com
DocumentRoot /usr/local/wwwroot/chinaface
ServerName www.111cn.net
ErrorLog logs/chinaface.net-error_log
CustomLog logs/chinaface.net-access_log common
</VirtualHost>
在这里,NameVirtualHost的字段不能省略,否则起apache时报错:
VirtualHost 127.0.0.1.80 overlaps with VirtualHost 127.0.0.1:80, the first has precedence, perhaps you need a NameVirtualHost directive——虽然apache能起,
同错误描述一样,第二个站点的定义被第一个站点的定义所覆盖,即访问第二个站点指向的其实是第一个
NameVirtualHost 字段的端口号不能忽略,否则起apache时报错:
VirtualHost 127.0.0.1:80 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[error] VirtualHost 127.0.0.1:80 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results——apache不能起
如果VirtualHost 字段的端口号确实可用,起apache时报错:
VirtualHost 220.231.32.28:0 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results——
但apache可以启动,访问也正常
3 Could not reliably determine the server’s fully qualified domain name

加入ServerName 127.0.0.1即可。
通常每个套接字地址(协议/网络地址/端口)只允许使用一次

(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
导致这个问题的原因如下:
1: 可能是本机同时安装了IIS,占用了80端口,关闭IIS重启Apache
2: 可能是本机开着迅雷或者其他软件占用了80端口,试着关闭相关软件

0 comments

Popular Posts

无觅相关文章插件,迅速提升网站流量