tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Johnson <>
Subject Handling wildcard domains in Tomcat 8.0
Date Sat, 04 Mar 2017 04:33:25 GMT

I have observed that with the default configuration where the <Host> name
is 'localhost', Tomcat will change the Host and X-Forwarded-Host headers to
the IP address of the local machine.  For my use case, this is highly
undesirable behavior, because the hostname is meaningful to my application
(but one application needs to handle all possible hosts).

I've used the <Alias> entry to convince it not to change the Host headers
for one FQDN; however, I see that wildcard support in <Alias> doesn't exist
prior to Tomcat 8.5.  As I'm using a hosted service which provides Tomcat
8.0, I'm trying to find a workaround for this problem in Tomcat 8 if I can.

Is there any way to have Tomcat 8.0 have a single virtual host handle all
of a wildcard domain, or, barring that, is there a way to get it to pass
through the Host header, unchanged, to the default Host (effectively
directing ALL traffic at the default Host, unchanged, regardless).

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message