Apologies if this comes through twice, it didn’t show up the first time:
Yep, this is a common issue. For an immediate stop-gap, create host entries on each server to point to itself and reinit on each server via remote desktop.
Now, first ensure that all the appropriate production URLs are in your environment configuration so you get production settings when you reinit.
Now, I’m a little unclear on how your network is set up and if you have a way to target a specific server yet. The way I have done this is by creating multiple policies on the load balancer. One general policy that balances between each IP and another for each server that always hits just the IP for one server. Then map your DNS entries to point to the appropriate LB IP. If you don’t want the public doing this, don’t NAT the per-site IPs externally and hit them over the VPN using local DNS.
Some of this depends on how your LB is set up. If your servers are not on their own subnet (“behind” the LB), then you can skip the extra policies and just route DNS to the correct IPs. Also, if you’re using host headers to bind your web server, make sure all the possible host names are configured. If you’re binding just to IP, you should be fine.
www.mysite.com → points to public load balanced IP
www1.mysite.com → points to the IP for web 1
www2.mysite.com → points to the IP for web 2
www3.mysite.com → points to the IP for web 3, etc…
Now if you do want people to be able to legitimately hit www1, www2, etc and use it then install this or something similar:
It overwrites the SES base URL in the request context on every request so any links built for that person reflect their current URL (whatever that may be)
However, if you want to always and forever force your public to one “sanctioned” domain, then hard code that one in your routes.cfm and all links will always use it.
One final note, if you use the session scope to save state, check and see what the load balancing algorithm is. Round robin will move people between servers and they’ll use their sessions, so sticky sessions (server affinity) may need to be enabled unless you’ve written your application to handle it.
ColdBox Platform Evangelist
Ortus Solutions, Corp
ColdBox Platform: http://www.coldbox.org