How to configure a virtual host per JBoss profile on httpd using mod_cluster?

Solution Verified - Updated -

Issue

  • There are two virtual hosts in Apache (virtualhost1 and virtualhost2) and two profiles in JBoss EAP 6 (profile1 and profile2). However there is a need to restrict the virtualhost1 to only serve contexts deployed to profile1, the same for virtualhost2 and profile2.
  • How can we isolate multiple JBoss instances to particular host names when connected to the same Apache server using mod_cluster?

From mod_cluster.conf:

ManagerBalancerName mycluster

From virtualhost1 and virtualhost2:

ProxyPass        / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://mycluster/

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x
  • Red Hat JBoss Enterprise Web Server (EWS)
    • Apache httpd
    • mod_cluster
  • JBoss Core Services (JBCS)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content