Monday, March 10, 2008

Moss and Virtual IP's

If I remember correctly, there was an issue with SPS 2003 and using Virtual IP's in IIS. This is still the case.

I've run into this a few times in different ways, if you assign an IP to an IIS virual server, some of SharePoint's features won't quite work correctly.
Virtual IP's are extra IP's you have added to your computer, and then set each IIS virtual server to only watch for traffic on the specified IP. These are sometimes used for load balancing, or if you don't trust host headers to forward traffic to the correct web application in IIS.

1: Using a dedicated search index machine. When you use central admin to pick a machine that should be dedicated for search, it will change your hosts file to point all requests for www.mysharepointSite.com to the IP assigned to that machine. You won't be able to change this, since SharePoint will wipe out any changes that you make. This fine, unless you assign a virtual IP in IIS to the web application that is running your site. SharePoint will set the hosts file to use the physical IP of the machine, not the virtual IP. This will break search since IIS will not pick up the request since it is setup to only watch for traffic on a different IP.
The solution is to edit the hosts file yourself, and tell SharePoint to use all servers for indexing. It is convenient to use the central Admin UI to setup which machine will be used to search, but it does nothing more than change the hosts file. You can do this manually and have more control.

The hosts file allows you to override what DNS says. If your DNS server is setup to point www.mysharepointsite.com to 123.123.123.123, you can add a line in your hosts file to look somewhere else. This is especially useful for testing. The hosts file is located at:
C:\windows\system32\drivers\etc\hosts. It does not have an extension and can be edited using notepad.




2: Alternate access mappings. If you are using Virtual IP's for your IIS virtual servers, setting up an alternate access mapping in CA is not enough to get it to work. You will also have to go into IIS and manually add the host header to the virtual server.

No comments: