Status: Resolved (View Workflow)
Regardless the upper/lower case of an Alias one configured in JBossWeb (EAP 6.4.3, mod_cluster subsystem 1.2.11.Final), it has always been reported to Apache HTTP Server in lower case. For example, the following configuration:
sends this message with aliases actually being reported in lower case: JVMRoute=workerXXX&Alias=web2%2Cweb2.rhel7gax86-64&Context=%2F. Having aliases stored in lower case on the Apache HTTP Server side enables both these URLs to work perfectly:
. The balancer configuration is just a simple UseAlias 1.
Undertow (JBossWeb's successor in EAP 7.0.0.DR7, mod_cluster subsystem 1.3.1.Final) behaves differently; it reports verbatim what one sets as an alias, so with the following configuration:
, the message reported to Apache HTTP Server actually is:JVMRoute=workerXXX&Alias=web2%2Cweb2.rhel7GAx86-64&Context=%2F. Due to the fact that aliases are being compared byte-by-byte for equality (because pumping of slash characters takes place) and the accessed domain is always in lower case and alias is stored as it was received, there is never match between these.
The result is that while these work:http://web2:6666/, http://web1:6666/, one of the upper case containing ones work at all: http://web1.rhel7GAx86-64:6666 and http://web2.rhel7gax86-64:6666/ neither. By not working I actually mean they return the root of Apache HTTP Server Welcome page instead of correctly forwarding to one of the Application server's virtual host contexts.
Last but not least, while EAP 6.4.3 with JBossWeb itself treats aliases as case-insensitive, EAP 7.0.0.DR7 with Undertow does not; i.e. web1.rhel7GAx86-64:8080/ returns correctly web application content whereas web1.rhel7gax86-64:8080/ returns EAP7 Welcome page.
While the aforementioned is clearly a bug (or a weird feature ) in Undertow, we must make the Apache HTTP Server code resilient to such behaviour.
I suggest converting aliases to lower case in mod_manager on ENABLE-APP arrival. According to my preliminary tests, this approach works for both JBossWeb and Undertow equipped workers. I think it's cool to do that: RFC 1035.