Is it possible to have multiple folders where I can place applications to be deployed?
How are these defined?
And is it possible to restrict one folder to just be applications for "domain.com" and no other domain.
Thanks
The webapps directory is where deployed applications reside in Tomcat. The webapps directory is the default deployment location, but this can be configured with the appBase attribute on the <Host> element.
You can of course have multiple apps in each directory if you need. Another option is to keep the default tomcat configuration and use another http server (apache, nginx, lighttpd,...) to map a port to the internal path of a tomcat application.
Take a look at conf/server.xml
:
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
You can nest <Host>
elements within the <Engine>
element and have different ones corresponding to different virtual hosts, different appBase
's etc.
Here's the documentation on the <Host
> element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With