Over the last couple of months I’ve had a couple readers contact me wondering how to set up multiple websites on one Domino server.
So this month we’ll go into the configuration necessary to get Domino to play nice while serving up more than one site from the same server.
Lotus Domino, by default, sets up one website when you turn on the HTTP task on the server. Domino points to a database called homepage.nsf.
This is simple placeholder database that shows a user hitting the web site links to Notes/Domino help and other IBM Lotus websites. Obviously, you will want change this as soon as you turn on HTTP on the server.
If you are only going to have one site, you can edit the details of the site in your Server document. But, since Domino has the power to do so, you might as well enable it to serve up more than one site.
Changing The Server Document
The first thing you have to do is open your Domino Directory and find your Server document.
On the Basics tab, in the Basics section you will see the option to Load Internet configurations from Server\Internet Sites documents:
Set this to Enabled. This tells your Domino server to look at individual Website documents to see which websites reside on your server instead of pulling that information from the Server document.
Adding Website Documents
In the address book, choose the Configuration section, and then expand the Web section. You will see the Internet Sites view.
Click on Internet Sites and you will see a list of existing sites on the right (if there are any) Since there are none on your server at this time, you will want to start adding them.
You can create as many sites as your hardware can handle, and they can all share the same IP address on the server. What you do to differentiate them is give them different URL’s.
In my example I have www.acme.com (my default site) and site2.acme.com both pointing to the same IP address. Now we just have to tell Domino that they are different sites and reside in different places.
Click Add Internet Site, and choose Web. This will create a new Website document. It will look like below:
The Basics tab holds the following information:
- Descriptive name for the site — This is just a name for you to use to differentiate sites on the server. This has no effect on how the site works.
- Organization — This is just a category that you can sort sites by. For example, if you run multiple companies, you may want to put their name here so sites for that company sort accordingly.
- Use the web site to handle requests which cannot be mapped to any other websites — This could have been simply been called “Default Website?” This means that this is the website that is served up if Domino can’t figure out what you were trying to hit based on the URL you typed in.
- Host names or addressed mapped to this site — If you answered No above to being the default site, then this is the area you would enter your site’s URL. I’ll explain that more shortly.
- Domino servers that host this site — Enter the servers that will host this website. You can just put one there if the site it only in one location. If you have your site replicated to multiple servers, then you enter multiple servers in this list.
The Configuration tab has a bunch of advanced web settings that are beyond the scope of this article and you can leave as defaults. There are two things that are very important however.
This is the default file that opens up when someone hits this site. It can be a Notes database or an HTML file.
This location is relative to the Domino Data directory. So in the above example /mywebsite.nsf is located in the servers Data directory.
If you were to place it in a folder called sitefiles inside of the Data directory, your entry would look like /sitefiles/mywebsite.nsf
This is where Domino will look for HTML files if they are not embedded in a Notes database. So for example, if your Notes database calls for a link to hit page1.html then you would want to put page1.html in this folder on the server. This folder is also relative the the Data directory on the Domino server.
For the purpose of this article, we will leave the other tabs of the website document at their default settings and click Save and Close.
To find information on those tabs and their associated settings please check out the Domino Administrator help files.
Once you create a website document, your HTTP task doesn’t know about it for awhile unless you force the issue. So on the Domino server console itself, you can enter:
tell http refresh
This will force the http task to put the new parameters into effect. You can also restart the http task or reboot the server. All three will force the website documents to go into effect.
So now we have our default website set up. Any http traffic coming to this Domino server will be served mywebsite.nsf. So, since www.acme.com points to this server, it will serve up mywebsite.nsf.
Now, we want to add another site called site2.acme.com. You can see the settings for that in the next graphic.
As you will see, the only changes we have on the Basics tab are that the default site settings are set to NO, and we put the actual URL for site2.acme.com in the Host names or addresses mapped to this site field.
This tells Domino that any incoming http traffic destined for site2.acme.com goes to whatever we set up on the Configuration tab.
So if the Home URL of this site is mySecondWebsite.nsf, then that is what will be served up to users going to site2.acme.com. So with these two documents in place, the following is true:
People going to site2.acme.com will get mySecondWebsite.nsfPeople going to anything else will be served myWebsite.nsf
As you can see, you can create as many websites as you wish and serve them all up from one server. Just make sure to always have a default site.
Without a default site, http traffic coming to the server that doesn’t match any sites will receive an error message.
Use website documents to your advantage on your intranet by setting up easy to use URL’s for all of your applications. hr.acme.com, sales.acme.com, phonebook.acme.com, or intranet.acme.com are simply a quick website document away.
You won’t have to buy additional hardware or software and your users will appreciate the added simplicity.
About This Series
This series of articles on intranet solutions with IBM Lotus Notes/Domino and it’s companion products is intended to help readers understand the fundamental methodology and capabilities of the product and how to utilize it to deliver a feature-rich, secure, and functional corporate intranet solution.
It will include implementation strategies, case studies, industry-tested tips and tricks, and, with your input, true value to the administrator or developer who wants to utilize IBM Lotus technologies to deliver winning intranet solutions.
If you have any questions on the series, Lotus Notes/Domino, or if there’s something you’d like to see addressed, visit the Intranet Journal Discussion Forum.