Virtual Hosting with Tomcat - JBoss

Ratings:
(4)
Views: 0
Banner-Img
Share this blog:

 

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:

You liked the article?

Like: 0

Vote for difficulty

Current difficulty (Avg): Medium

EasyMediumHardDifficultExpert
IMPROVE ARTICLEReport Issue

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 in the market.

Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox