Yesterday I had to do some server configuration. While it's not really my territory it's impossible to avoid at times and all part of being an all-round developer. That said, it doesn't help that configuring Domino is never as straight-forward as you'd expect. Here's a case in point.
Imagine I had an application called Bungle. In the Domino Directory I set up an Internet Site document to map all variants of bungle.mydomains.* so they all point to /apps/bungle.nsf. It would look like this:
Note that using one Internet Site document I've covered all the domains.
Now imagine that I've added a funky-looking login form to bungle.nsf and I want to make sure any login attempts at bungle.whatever.* point to this form. To do this I need to create a "Sign In" Form Mapping in the domcfg.nsf database. Something like this:
Notice that the "Web Site/Virtual Server" is listed as BUNGLE. This is the same value as we gave to the name of the Internet Site document earlier. This is how you'd expect it work, no? Well, it doesn't. I've tried everything and have always had this problem with domcfg.nsg mappings to Internet Site document by name. Notice I've even left spaces out of the name in an attempt to work it all out. It just does not work.
The popup help for this field in the mapping document says (emphasis my own):
If using Web Site configuration documents, specify the name of the Web Site this mapping applies to. Otherwise specify the Virtual Server name or the IP address.
So, by naming the mapping BUNGLE it should have worked? Is it me or does this popup help not help at all. Web Site? Are they the same as Internet Sites? Virtual Servers? What are they? What about FQDNs — are they allowed?
After hacking about I managed to work it out. You can in fact add the FQDN to this field, but, for each domain, you need to create a new mapping. The reason for this is simple — in the Internet Site document the field to record the host names is multi-value, while, in the mapping document, it isn't.
So, we need to create one mapping for each FQDN, like so:
So there you have it. That's how to map login forms to more than one domain which points to the same application. I was tempted to try and change the LF_IP field to multi-value to see if that worked. My guess is it would. Maybe if Domino ever went open source that could be my first fix.
This might look like an excuse for me to have a dig at Domino, which it is. Moreover it's to help out you guys in the future and people having the same problem who might Google it. So add this to your mental bookmarks of problems solved here at codestore.net ;o)