1 Reply Latest reply on Jan 30, 2018 4:51 AM by abhijithumbe

    Migration from Glassfish: virtual servers

    william.mann

      Hi,

       

      I'm preparing to migrate my applications to Wildfly 11, however I can't figure out how to migrate my virtual servers. That is, my AS is on a DMZ network with a private IP address and my firewall is configured so that each application has a different public IP that is then NATted to my AS. With Glassfish you can define different virtual servers that listen for specific IP addresses or specific domain names (which is my case). You then configure the web application to run within a specific virtual server. For examplel, myapp1 is configured on virtual server 1 which listens for myapp.mydomain.com and myapp2 is configured for virtual server 2 which listens for myapp2.mydomain.com and myapp.mydomain.com. Is this possible with Wildfly? And if so, how would you configure it?

       

      Thanks!

        • 1. Re: Migration from Glassfish: virtual servers
          abhijithumbe

          In wildfly you can configure virtual server/virtual host in undertow subsystem like as:

           

          <host name="secondhost" alias="application1">
            <access-log prefix="application1"/>
            </host>

          and in jboss-web.xml of application define this host name, like as:

           

          <jboss-web>
             <virtual-host>secondhost</virtual-host>
          </jboss-web>

           

          Now if you hit http://localhost:8080/  then request will send to the `default-host` host and if you hit  to http://application1:8080/, that request will be routed to the secondhost host.