I have two application running in CentOS on Ports 3000 and 4000. We have configured in F5 load-balancer to redirect any request that is coming to *.test.example.com to the application running in port 3000. But we are trying to point only a subdomain of the application to point to 4000 and rest point to 3000. For instance, request coming to demo.test.example.com should be redirected to the port running in 4000 as the other requests to *.test.example.com should be directed to the application running in port 3000.
I have to configure this in either F5 or on the application side
Is there any way to configure the sites in CentOS machine like host file to redirect the requests to the port running in 4000 only for the subdomain demo.test.example.com?