无法通过Internet安装LAMP访问VPS

时间:2013-09-25 11:19:27

标签: lamp vps

我安装了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 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

1 个答案:

答案 0 :(得分:0)

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

使用iptables列出防火墙规则

iptables -L

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

ps aux | grep apache

或安装lynx

lynx localhost