AAM example when using Load Balancer
Thought I’d put this out since although there are many posts on this over the Internet I have not found a good example. Knowledge about AAMs are important for any SharePoint administrator
First read this
If all that is to hard to digest and all you have is two servers and one load balancer and you feel that your existance would be justified if people could type in www.iamconfused.com (I made that up) and access the site by hitting one of the two servers that are load balanced then read on.
Here is the scenario.
- You have two servers Server1 and Server2.
- Your load balancer is set up such that if someone accesses http://www.iamconfused.com (I made that up) it will redirect to either http://server1 or http://server2.
- You feel that your existence would be justified if people could type in www.iamconfused.com and access the site you have designed
First I assume that the load balancer is all set up fine (meaning it works). Get your network admin to verify that.
Browse to the Central Admin. Create your webapp on a port other than 80 (Lets say 1234).
Next extend your webapplication to Port 80 and select the zone as Internet. After this is done make sure that all web.config changes and dlls in the bin folder are moved across to the new webapplication folder.
Once this is done ensure that the application is working as expected on port 80 of the machine you are working on meaning if you type in http://server1 the site loads up fine. Assuming server1 was where central admin is hosted on. If now you type in http://server2 it might redirect back to http://server1 but that’s OK.
Get to the AAM settings page and select http://server1:1234as the webapp
This should be what you see
| Internal URL | Zone | Public URL for the zone |
| http://server1:1234 | Default | http://server1:1234 |
| http://server1 | Internet | http://server1 |
Use the Edit public url and Add internal URL links to change this to
| Internal URL | Zone | Public URL for the zone |
| http://server1:1234 | Default | http://server1:1234 |
| http://server1 | Internet | http://www.iamconfused.com |
| http://server2 | Internet | http://www.iamconfused.com |
| http://www.iamconfused.com | Internet | http://www.iamconfused.com |
I am too lazy to walk through how to get it like this, however its not too difficult.
And thats all there is to it. Your site will be working fine. Just give it a few minutes; I have noticed even after doing an IIS reset the changes take a bit to come into effect.
BTW If you have not got your AAMs configured correctly, and you browse to http://www.iamconfused.com you might see some links in the page pointing to the server name. If you are behind a firewall which only allows access to the http://www.iamconfused.com this is one reason why you could get a lot of broken links in the site.