无法从互联网安装LAMP的VPS访问 VPS



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

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

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

这是我的 ip表

[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 apache:

[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

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

列出包含 iptables 的防火墙规则

iptables -L

验证 Web 服务器是否正在运行

ps aux | grep apache

或安装lynx

lynx localhost

最新更新