我重新启动了服务器,Apache 停止响应但仍在运行。
为什么会出现这种情况,能怪罪 ipv6 吗?
错误日志:
[Sun Jan 23 08:25:17 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sun Jan 23 08:44:31 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jan 23 08:44:31 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Jan 23 08:44:31 2011] [notice] Digest: done
[Sun Jan 23 08:44:32 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sun Jan 23 09:09:50 2011] [notice] caught SIGTERM, shutting down
[Sun Jan 23 09:09:51 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jan 23 09:09:51 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Jan 23 09:09:51 2011] [notice] Digest: done
[Sun Jan 23 09:09:51 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
lsof -i | grep 列表
portmap 2404 rpc 4u IPv4 4801 TCP *:sunrpc (LISTEN)
rpc.statd 2439 rpcuser 7u IPv4 4949 TCP *:925 (LISTEN)
sshd 2605 root 3u IPv6 5371 TCP *:ssh (LISTEN)
sendmail 2644 root 4u IPv4 5538 TCP localhost.localdomain:smtp (LISTEN)
httpd 3873 root 3u IPv6 14406 TCP *:http (LISTEN)
httpd 3874 apache 3u IPv6 14406 TCP *:http (LISTEN)
httpd 3875 apache 3u IPv6 14406 TCP *:http (LISTEN)
httpd 3876 apache 3u IPv6 14406 TCP *:http (LISTEN)
httpd 3877 apache 3u IPv6 14406 TCP *:http (LISTEN)
httpd 3878 apache 3u IPv6 14406 TCP *:http (LISTEN)
httpd 3879 apache 3u IPv6 14406 TCP *:http (LISTEN)
httpd 3880 apache 3u IPv6 14406 TCP *:http (LISTEN)
httpd 3881 apache 3u IPv6 14406 TCP *:http (LISTEN)
Iptables:
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT icmp -- anywhere anywhere
ACCEPT tcp -- anywhere my-ip-adress-xx.local tcp dpt:http
Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT esp -- anywhere anywhere
ACCEPT ah -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT tcp -- anywhere anywhere tcp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
答案1
默认防火墙规则阻止了您。RH-Firewall-1-INPUT 规则首先加载,并找到拒绝规则,然后才在 INPUT 规则中允许。尝试查看 /etc/sysconfig/iptables,并修改 RH-Firewall-1-INPUT 规则以允许您通过 tcp 端口 80 进行访问。
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited