2

I have an application running on a Tomcat server at http://example.com:8080/webapp.

I would like my app to be accessible at http://example.com.

How to remove the :8080/webapp path?

1
  • You can either use an apache server as a gateway proxy or configure tomcat via its server.xml configuration file. – Ortomala Lokni Jan 21 '18 at 18:31
0

To change the port, edit the connector element in serverl.xml. Such as in:

<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

For deploying at the root, you can change the path in the context element such as in:

<Context path="" docBase="war_name" debug="0" reloadable="true"></Context>

Here is a question about setting the context path to root:

An interesting article about tomcat configuration:

For details, read the tomcat documentation:

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.