Tomcat on port 80
My first bug of 2020.
Out of habit I tend to run Spring boot web applications on localhost at port 8080 for development.
Naively I wanted to change this and run tomcat on my Mac on localhost at port 80, it being a regular http port and all.
Result; computer says "NO!" [Caused by: java.net.SocketException: Permission denied].
Turns out port 1024 and lower are generally reserved for users with root access on Unix systems.
And to prevent root level code exploits the default http port is 8080 for tomcat.
Out of habit I tend to run Spring boot web applications on localhost at port 8080 for development.
Naively I wanted to change this and run tomcat on my Mac on localhost at port 80, it being a regular http port and all.
Result; computer says "NO!" [Caused by: java.net.SocketException: Permission denied].
Turns out port 1024 and lower are generally reserved for users with root access on Unix systems.
And to prevent root level code exploits the default http port is 8080 for tomcat.
Comments
Post a Comment