mobileNavlogo
headerlogo

Virtual Hosting with Tomcat - JBoss

24 September, 2020

Ratings

Related Blogs

 

Virtual Hosting with Tomcat - JBoss

Add hosts and aliases to server.xml:

<Host name="myhost.com">
<Alias>www.myhost.com</Alias>
</Host> Register applications for virtual hosts in their WEB-INF/jboss-web.xml files:

<jboss-web>
<context-root>/myapp</context-root>
<virtual-host>myhost.com</virtual-host>
</jboss-web> Applications default to host specified by <Engine>'s defaultHost attribute

server.xml <Server> <Service> <Connector .../> <Engine> <Host name="myhost.com"> <Alias>www.myhost.com</Alias> </Host> <Host name="anotherhost.com"/> </Engine> </Service> </Server> myapp.war/WEB-INF/jboss-web.xml:  <jboss-web> <context-root>/myapp</context-root> <virtual-host>myhost.com</virtual-host> </jboss-web> ROOT-another.war/WEB-INF/jboss-web.xml:  <jboss-web> <context-root>/</context-root> <virtual-host>anotherhost.com</virtual-host> </jboss-web>

For an in-depth understanding on JBoss click on:

About Author
Authorlogo
Name

TekSlate

Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .