linux主机访问虚拟主机的Tomcat问题

    xiaoxiao2021-03-25  105

    参考:http://www.mamicode.com/info-detail-1179017.html

    linux版本:redHat 6

    本地访问虚拟主机tomcat 8081端口

    [root@localhost tomcat]# vi /etc/sysconfig/iptables

    添加一行:

    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT

    重启网络:

    [root@localhost tomcat]# /etc/init.d/iptables restart 报出如下错误:

    iptables: Applying firewall rules: iptables-restore: line 13 failed 解决:

    [root@localhost tomcat]# iptables -N RH-Firwall-1-INPUT [root@localhost tomcat]# service iptables save [root@localhost tomcat]# /etc/init.d/iptables restart 这里好像没有对防火墙针对于8081端口的设置,然后本机就可以正常的访问对应的8081的tomcat

    转载请注明原文地址: https://ju.6miu.com/read-11588.html

    最新回复(0)