Tomcat does not run on port 80 as non-root

It is not recommended to make tomcat listen in 80 port, since Tomcat would need to run as a privileged user.

It is suggested either you redirect the port traffic using iptables .

# /sbin/iptables -A FORWARD -p tcp --destination-port 80 -j ACCEPT
# /sbin/iptables -t nat -A PREROUTING -j REDIRECT -p tcp
--destination-port 80 -to-port 8080
# /sbin/iptables-save

Please remember that in this case clients connecting from server itself have to connect to 8080 port itself.

OR

Another option is to use Apache as a front end to all requests and use modules to redirect to tomcat.

One Reply to “Tomcat does not run on port 80 as non-root”

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.