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
  • Red Hat JBoss Enterprise Web Server (EWS)
    • Apache httpd
    • mod_cluster

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.