Apache hostname and port is not returned when using JBoss EAP and mod_proxy http

Solution Verified - Updated -

Issue

  • We are using mod_proxy_http or mod_cluster as a load balancing solution and have found that the following java API

    HttpServletRequest.getServerName()
    HttpServletRequest.getServerPort()
    

    returns the hostname and port of the JBoss EAP instance instead of the hostname and port of the Apache httpd server

  • We have OS level web server ( apache 2.2.15) and back-end EAP application, we have configured mod_proxy to get backend application accessible on web server.When we try to access application using web server URL , the URL gets changed from the web server URL to application URL ( domain name gets changed).

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x
  • Apache httpd
    • mod_proxy http
    • mod_cluster

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