无法远程连接到Apache服务器

时间:2014-01-15 11:25:20

标签: linux apache

我在小狗linux中设置apache并且可以在localhost中看到文件。但是,当我打开port80并尝试从iphone连接apache但它失败了。我只能看到一个白页。也许它不是404因为它没有显示404错误。(在我打开端口之前,我看到了404.)

我已将apache.conf配置为Allow from all。

访问日志和错误日志没有显示任何内容。

这是iptables-L

Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ftp 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:domain 
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:domain 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:finger 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:www 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:pop3 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:auth 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:imap2 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:443 
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:syslog 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:printer 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:993 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:995 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:www 
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:www 
A   CCEPT     all  --  anywhere             anywhere            state NEW 
 TRUSTED    all  --  anywhere             anywhere            state NEW 

Chain FORWARD (policy DROP)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
DROP       icmp --  anywhere             anywhere            state INVALID 

Chain TRUSTED (1 references)
target     prot opt source               destination         
ACCEPT     icmp --  anywhere             anywhere            icmp echo-request 
DROP       icmp --  anywhere             anywhere            
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-            unreachable 

用netstat

tcp        0      0 192.168.100.100:80      0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN 

我如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

  

tcp 0 0 192.168.100.100:80

问题就在这里。服务器正在侦听特定的本地IP地址,而不是0.0.0.0。