您的位置:首页 > 运维架构 > Tomcat

Change tomcat port number from 8080 to 80

2016-11-06 14:20 387 查看
I ever read a lot of blogs that how to change port numbers, which makes it funny is all the answers seems to the same, such as simply change the port from 8080 to 80 in the server.xml. Actually, It is not a fully correct answer, for new learners like me,
after we follow the steps above, we may get confused that we even cannot access to the server after we changing the port number. the Reason is that ports below 1023 is reserved, only root users can change it, but how to run as root??? the simple way is to
use 'sudo' command.

normally we may start up a tomcat by typing './bin/startup.sh', but this cannot open the port number, Instead of that, we should type the command 'sudo ./bin/startup.sh', after that we could see we don't need to contain any port number in url but still can
access to the server.



The main advantege of changing port number from 8080 to 80 is that we no more need to contain port number in our http request url.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Port number 8080 80
相关文章推荐