Why does Tomcat work with port 8080 but not 80?

前端 未结 7 1712
刺人心
刺人心 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:19

    stop apache service and then run tomcat you should be good , by default apache is running on port 80

    0 讨论(0)
  • 2020-12-08 16:28

    Run your startup script as root after changing the binding.

    sudo ./<path to tomcat bin director>/startup.sh
    
    0 讨论(0)
  • 2020-12-08 16:29

    You can use authbind/privbind or capabilities to bind to port 80.

    0 讨论(0)
  • 2020-12-08 16:37

    Did you start Tomcat on port 80 as root? You have to be root to bind to ports <= 1024 in Linux.

    0 讨论(0)
  • 2020-12-08 16:40

    go to /etc/default/tomcat6 and change #AUTHBIND=no to AUTHBIND=yes

     # If you run Tomcat on port numbers that are all higher than 1023, then you
     # do not need authbind.  It is used for binding Tomcat to lower port numbers.
     # NOTE: authbind works only with IPv4.  Do not enable it when using IPv6.
     # (yes/no, default: no)
     #AUTHBIND=no
    
    0 讨论(0)
  • 2020-12-08 16:42

    Two typical reasons:

    • You quite possibly don't have permission to listen to a port lower than 1024 (usually requires administrative privileges, e.g. being root)
    • Something else may already be listening on port 80 (e.g. apache)
    0 讨论(0)
提交回复
热议问题