CentOS VPS如何打开80端口解决网站打不开的问题

电脑入门知识大全 电脑知识 10

  你是否在使用云服务器的时候网站出现打不开的状况,那么多半是vps的80端口未打开或被封了,那么CentOS要如何打开vps 80端口呢?需要通过防火墙打开,具体的随小编一起来了解下吧。

CentOS VPS如何打开80端口解决网站打不开的问题-第1张图片-90博客网

  CentOS 防火墙开启80端口

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

  #/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT

  然后保存:

  #/etc/rc.d/init.d/iptables save

  注意需要重启服务哦:执行service iptabels save 与 service iptables restart

  端口查看方法:

  vhost]# /etc/init.d/iptables status

相关影片资源迅雷下载推荐

将CentOS服务器的目录映射为Windows磁盘驱动器的方法

  Table: filter

  Chain INPUT (policy ACCEPT)

  num target prot opt source destination

  1 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80

  2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80

  Chain FORWARD (policy ACCEPT)

  num target prot opt source destination

  Chain OUTPUT (policy ACCEPT)

  num target prot opt source destination

  上面就是CentOS系统vps打开80端口的方法介绍了,很多人在开启80端口后不知如何查看,所以本文还介绍了vps 80端口的查看方法。


相关影片资源迅雷下载推荐

在国外主机上将Linux系统时间修改为北京时间的方法

抱歉,评论功能暂时关闭!