Why does Tomcat work with port 8080 but not 80?

前端 未结 7 1713
刺人心
刺人心 2020-12-08 15:59

I have started and tested Tomcat under Port 8080 (default). Now I altered the connector port to 80 and restarted Tomcat, nothing will show on my minimal Debian 6.0 installa

相关标签:
7条回答
  • 2020-12-08 16:42

    If nothing of the commented before works (like it happened to me), you can direct the traffic from the port 80 to the 8080.

    To do it:

    http://forum.slicehost.com/index.php?p=/discussion/2497/iptables-redirect-port-80-to-port-8080/p1

    In a nutshell, type this three commands in a terminal:

    $ sudo iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
    $ sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT
    $ sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 
    
    0 讨论(0)
提交回复
热议问题