Search code examples
tomcatservletsweb.xmlservletconfig

how to change webapp url


URL for my webapp which is deployed on tomcat server is: http://host:port/myapp

How I can change this url to some thing like below for same tomcat home: http://test.myapp.com


Solution

  • First of all you have to own the domain from your example URL, or configure local DNS/ hosts entries on your workstation to map URL to your server IP.

    Then you will have to bind tomcat to port 80, and deploy your app with name ROOT.war or alternatively use apache http server at front (module mod_proxy might be helpful, check this link).