【问题标题】:Not able to access Centos Apache page from another Computer无法从另一台计算机访问 Centos Apache 页面
【发布时间】:2020-09-27 14:23:12
【问题描述】:

今天在 CentOS 上启动了 apache,我可以在与 localhost 相同的机器上打开测试页面。但是我无法使用另一台计算机打开它。 CentOS 服务器位于路由器后面的 VLAN(使用交换机)上。我可以使用我的笔记本电脑从另一端 ping 服务器。但是我无法在浏览器中打开测试页面。我在同一 VLAN 中有另一台服务器,我可以从我的笔记本电脑访问它。

这里还有一些 iptables -L 的条目

Chain INPUT 
ACCEPT  tcp   --  anywhere    anywhere   tcp:dtp:http
ACCEPT  udp   --  anywhere    anywhere   udp:dtp:http
REJECT  all   --  anywhere    anywhere   reject-with  icmp-host-prohibited

Chain FORWARD
REJECT  all   --  anywhere    anywhere   reject-with  icmp-host-prohibited

我不确定我还需要检查什么。

【问题讨论】:

    标签: centos apache iptables


    【解决方案1】:

    安全理论告诉我们首先放弃防火墙并进行测试 (iptables -F)。如果您可以访问,那么这确实是一个 iptables 问题,如果您仍然无法访问您的服务,请尝试查看是否有任何特定绑定:netstat -an | grep "LISTEN " 如果您看到类似:

    "tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN "

    表示你的服务器只监听 localhost ip,你应该检查 /etc/httpd/conf/httpd.conf 上的特定 httpd 绑定

    如果您需要更多帮助,请继续发帖 =)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-10
      • 1970-01-01
      • 2011-05-12
      • 2019-01-03
      • 1970-01-01
      • 2018-10-13
      • 2021-08-15
      相关资源
      最近更新 更多