How to change the port of Tomcat from 8080 to 80?

后端 未结 13 671
野的像风
野的像风 2020-11-22 17:22

I want to execute my web app as http://localhost.

相关标签:
13条回答
  • 2020-11-22 18:05

    On modern linux the best approach (for me) is to use xinetd :

    1) create /etc/xinet.d/tomcat-http

    service http
    {
            disable = no
            socket_type = stream
            user = root
            wait = no
            redirect = 127.0.0.1 8080
    }
    

    2) create /etc/xinet.d/tomcat-https

    service https
    {
            disable = no
            socket_type = stream
            user = root
            wait = no
            redirect = 127.0.0.1 8443
    }
    

    3) chkconfig xinetd on

    4) /etc/init.d/xinetd start

    0 讨论(0)
提交回复
热议问题