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

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

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

13条回答
  •  北海茫月
    2020-11-22 17:53

    On a linux server you can just use this commands to reconfigure Tomcat to listen on port 80:

    sed -i 's|port="8080"|port="80"|g' /etc/tomcat?/server.xml
    sed -i 's|#AUTHBIND=no|AUTHBIND=yes|g' /etc/default/tomcat?
    service tomcat8 restart
    

提交回复
热议问题