0

I'm having an issue accomplishing something. I currently own a domain and I have the DNS set up to hit Tomcat on 8080 on my local machine when requested in the browser. All good so far. So when it hits Tomcat I get the standard "Cat" page where I can access manager, host-manager, etc...

My goal is to set up a virtual host to have a request to my domain routed to a specific webapp located in the Tomcat_Home\webapp folder. So I configure my server.xml as such:

<Host name="dwnewton.com" appBase="webapps"
    unpackWARs="true" autoDeploy="true">

</Host>

The dwnewton.war has been deployed to webapps and has unpacked itself as expected. But no matter what I do I cannot get Tomcat to route my request to a specific webapp within the Tomcat_Home\webapp directory.

  • I've tried putting context.xml in the Meta_Inf of the specific application
  • I've tried configuring the context.xml in the conf directory
  • I've tried putting the [appname].xml in the conf\localhost directory

I'm getting pretty frustrated. Perhaps I'm specifying the appBase or path or docBase incorrectly. Or maybe I'm putting them in the wrong location.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

1

If you rename dwnewton.war to ROOT.war, it should be available at the root of your domain.

banderkat
  • 481
  • 2
  • 6
  • You are correct that my application will be available it I put it all in the ROOT directory. There are a few workarounds like this that will solve my problem. There are drawbacks. Lets say I navigate to http://localhost:8080 to manage my Tomcat instance. Not anymore. This is like making my webapp the default on this server. I could always navigate to the manager app but I would prefer not to. Also that limits me to one virtual host. Thats a no go. I would like to deploy my webapps inside the TOMCAT_HOME\webapps folder by their descriptive names. – David Newton Dec 29 '13 at 18:03