【问题标题】:Can't Access VPS with LAMP installed from Internet无法使用从 Internet 安装的 LAMP 访问 VPS
【发布时间】:2013-09-25 19:55:25
【问题描述】:

我有一个安装了 LAMP 的 VPS。我点击了这个链接:

https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6

我尝试在网络浏览器中输入我的 IP,但没有任何显示。

这是我的 ipTables

[root@localhost ~]# iptables -L
Chain INPUT (policy ACCEPT)
target      prot opt source     destination
ACCEPT      all -- anywhere     anywhere    state RELATED,ESTABLISHED
ACCEPT      icmp -- anywhere    anywhere
ACCEPT      all -- anywhere     anywhere
ACCEPT      tcp -- anywhere     anywhere    state NEW tcp dpt:ssh
REJECT      all -- anywhere     anywhere    reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target      prot opt source     desitnation
REJECT      all -- anywhere     anywhere    reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target      prot opt source     desination

这里是 ps aux | grep 阿帕奇:

[root@localhost ~]# ps aux | grep apache
apache  12500   0.0 0.1 232732  4724 ?  S   21:44   0:00    /usr/sbin/httpd
apache  12501   0.0 0.1 232732  4724 ?  S   21:44   0:00    /usr/sbin/httpd
apache  12502   0.0 0.1 232732  4724 ?  S   21:44   0:00    /usr/sbin/httpd
apache  12503   0.0 0.1 232732  4724 ?  S   21:44   0:00    /usr/sbin/httpd
apache  12504   0.0 0.1 232732  4724 ?  S   21:44   0:00    /usr/sbin/httpd
apache  12505   0.0 0.1 232732  4724 ?  S   21:44   0:00    /usr/sbin/httpd
apache  12506   0.0 0.1 232732  4724 ?  S   21:44   0:00    /usr/sbin/httpd
apache  12507   0.0 0.1 232732  4724 ?  S   21:44   0:00    /usr/sbin/httpd
root    12508   0.0 0.0 103236  824 pts/0   S   22:55   0:00    grep apache

【问题讨论】:

    标签: lamp vps


    【解决方案1】:

    正如您在上一个问题中所说,您可以通过 SSH 访问 IP。 当您无法通过 HTTP 访问 IP 时,您要么没有启动网络服务器,要么您有防火墙。

    使用 iptables 列出防火墙规则

    iptables -L
    

    验证网络服务器是否正在运行

    ps aux | grep apache
    

    或安装lynx

    lynx localhost
    

    【讨论】:

    • 我用 IP 表和这些命令的其他回复更新了 OP。
    • 有些人做了 3 年设置防火墙和服务器的教育。最好的办法是取消购买,使用标准虚拟主机并为自己设置一个虚拟机以与 linux 取得联系。
    • 我不担心安全性或未经授权的访问。我只需要这个来启动。
    • 在大多数 unix 命令中,您可以附加 -h 以显示帮助菜单...您甚至谷歌“如何删除 iptable 规则”?你是否?如果您想雇用某人来设置您的服务器,请提供该死的报价
    • 如果有人有任何准确和有用的建议,请加入。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-17
    • 2019-05-28
    • 1970-01-01
    • 2019-10-03
    相关资源
    最近更新 更多