I am using tomcat and it runs on port 8080 and how can I configure it in my vps server to view my jsp page as default...tomcat always runs in some port?


Switching Tomcat's port to 80 in server.xml would require root or some other super user to run the Tomcat process since 80 is a privileged port (< 1024). Please don't do this.

There are several threads on ServerFault discussing your question which you might want to take a look at. Using iptables to pre-route requests from port 80 to 8080 was the least invasive one, I think. But YMMV.


Change the port number in server.xml to 80.


You can change the port number in server.xml to 80, but that might not work if you're on a unix box and not root.

Alternately, you can set up an instance of apache and proxy port 80 to localhost port 8080 (where tomcat still runs). This is also handy if you want to run it as a virtualhost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy