I'm running Wilfly version 10, that has two domain names pointed at the server.
We'll call them applicationone.com and applicationtwo.com.
I have deployed two different .ear files.
We'll call them applicationone.ear and applicationtwo.ear
I have my standalone.xml configured with two hosts:
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp" max-parameters="5000"/>
<https-listener name="default" socket-binding="https" max-post-size="2147483648" max-parameters="5000" security-realm="ssl-realm" verify-client="REQUESTED" enabled-cipher-suites="TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" enabled-protocols="TLSv1.2"/>
<host name="default-host" alias="www.applicationone.com" default-web-module="applicationone.ear">
<filter-ref name="cache-control-header"/>
<filter-ref name="pragma-header"/>
<filter-ref name="expires-header"/>
<filter-ref name="x-content-type-options-header"/>
<filter-ref name="x-frame-options-header"/>
<filter-ref name="x-xss-protection-header"/>
<filter-ref name="strict-transport-security"/>
<filter-ref name="Access-Control-Allow-Origin"/>
<filter-ref name="Access-Control-Allow-Headers"/>
</host>
<host name="applicationtwo" alias="www.applicationtwo.com" default-web-module="applicationtwo.ear">
<filter-ref name="cache-control-header"/>
<filter-ref name="pragma-header"/>
<filter-ref name="expires-header"/>
<filter-ref name="x-content-type-options-header"/>
<filter-ref name="x-frame-options-header"/>
<filter-ref name="x-xss-protection-header"/>
<filter-ref name="strict-transport-security"/>
<filter-ref name="Access-Control-Allow-Origin"/>
<filter-ref name="Access-Control-Allow-Headers"/>
</host>
But, I continue to get errors, either with the .ear deployment or with the host configuration. This is an early version of Wildfly and we're not able to update it right now.