【问题标题】:Accessing Apache Server from a remote machine从远程机器访问 Apache 服务器
【发布时间】:2014-04-19 22:43:04
【问题描述】:

我正在使用 Red Hat 4.4.7-4 。我已经使用

安装了 Apache 服务器

yum 安装 httpd

/etc/init.d/httpd 启动

/etc/init.d/httpd 状态 httpd (pid 1371) 正在运行...

本机可以通过 VPN 客户端使用 ssh 终端访问。当我击中

http://ip address:80 

在浏览器中,页面不加载。我收到以下错误:

This Page Cannot Be Displayed

The system cannot communicate with the external server ( 173.39.232.226 ). The Internet server may be busy, may be permanently down, or may be unreachable because of network problems.

Please check the spelling of the Internet address entered. If it is correct, try this request later.

If you have questions, or feel this is an error, please contact your corporate network administrator and provide the codes shown below.
Notification codes:     (1, GATEWAY_TIMEOUT, 173.39.232.226)

另外,下面是 iptables 的输出

[root@blended-services-demo html]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http 

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

【问题讨论】:

    标签: apache rhel


    【解决方案1】:

    您可能需要在端口 80 上启用对服务器的访问权限,因为它当前被 iptables 阻止。

    sudo /sbin/iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
    

    这将在开始时将规则插入到您的 iptables 配置中。完成此操作并测试它是否有效后,您应该保存配置,以便下次服务启动时使用它,

    sudo /sbin/service iptables save
    

    这会将当前配置写入 /etc/sysconfig/iptables。

    如果这不能解决你的问题,我建议你看看这里: apache not accepting incoming connections from outside of localhost

    【讨论】:

    • 我查看了链接,但它仍然没有解决我的问题。我已经编辑了我的帖子以包含 iptables 的输出
    猜你喜欢
    • 2019-03-18
    • 2017-06-16
    • 2015-06-22
    • 1970-01-01
    • 1970-01-01
    • 2018-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多