Internet Information Services is by far the most popular server for Windows; and not without good reason. Personally I do not know what the people who recon Apache is more configurable are on about. They should really take a look at the properties page of a website on IIS. But complaining about them is another story; we are fear to get to grips with IIS.
For those of you with Windows Server 2003 you will have IIS 6.0. However seen as anyone with Windows Server 2003 will know that they are doing anyway and most users will have Windows XP or 2000, I am going to use IIS 5.1 as my model. This should cover most versions fine anyway as the interface changes have not been radical to the best of my knowledge.
Introduction
The key to management of IIS is the Management Console. This will have a toolbar along the top, a tree view on the left and a files list on the right at the bottom which is the main section. As standard when you open it in the tree view you get Internet Information Servers with the name of your computer in a branch. In a branch of your local computer you will then have Web Sites, below that FTP sites if you have added that on although it’s not installed as default and finally Default SMTP Virtual Server.
If you don’t see this then click the box with the plus in on the left of them to expand them so that you can. The next thing to do is to do the same so you can see a list of your websites. There should only be one unless you’re running a Windows 2000 Server. The one that does exist is called root. This is your default website so let’s start configuring it to your settings. Right click on it and click properties.
Customising
This will bring up the properties box with root properties at the top and no less than eight different tabs full of settings for you to configure the website. The first section of the already selected ‘website’ tab is how the site is identified. Leave the description as root. As next one, IP addresses allows you to specify different IP addresses for different sites although one you will only have one IP address most likely and two all IP addresses go to the root folder by default anyway. So seen as we do not have multiple websites this is not a problem.
The connections box is something that can be left alone. Although if you are having problems with time outs and pages not loading you may want to play about with the seconds before timeout. Below that is the box which enables server logging. I always find these useful and use the standard W3C format to log activity in a file.
Next up click the ‘ISAPI Filters’ tab. You will probably end up with a blank list with a few buttons. This is where you can install, enable and disable ISAPI filters. An ISAPI filter is a program that responds to events during the processing of an HTTP request. In other words special executable scripts that do things when a page is requested. An example of this is PHP although there are other ways to use PHP. But as an example, when a page is requested the ISAPI filter responds and sorts out the PHP code delivering HTML to the user.
Next click the ‘home directory’ tab. This gives information on where the files are on your computer. The top box gives you three options about where the files are. Even the directory should lead to a folder on this computer, the directory should lead to a folder on a network computer or it should redirect to a different address. The first two allow you to choose a file path, the first starting with drive:\ and the second starting with a network path.
These first two options also have tick boxes about what can be run and what cannot. Read just allows users to access and view files so keep this one ticked. Log visits and index this resource should remain at their default. Directory browsing means that users get a list of the files in the directory which they can click on to visit. Sometimes this is useful but if you don’t want visitors getting a full list of all the files then don’t tick it. Finally write allows files such as text files, databases, or anything else you want scripts to be able to add data to, to be changed.
Generally the application settings below this can be ignored too. The only one you may want to change is the application permissions allowing you to disable all scripts or allow scripts and executables. Or have a happy mix between. I always leave this at default although if you want to run some executables then you may want to disable them or if users can upload scripts to this directory you may want to disable this.
Next up is the ‘documents’ tab. This one controls the list of documents that are delivered as the default document of a folder if no file name is specified. You can add as many different possible file names as you want to this box by clicking add and typing the file name including the extension in such as home.html. You then order them as you want as the higher they are the higher priority they have. A have several in mine:
Index.asp
Index.php
Index.htm
Default.asp
Default.php
Default.htm
Index.html
Default.html
Iisstart.asp
This enables me to use all the standard file names for different sites and the homepage will still be delivered as the default document. Iisstart.asp is a default one added in by IIS as if no other documents are present you will be taken to an introduction page when you first point your browser to IIS before you have set it up. You can remove that one if you wish.
The other option under this tab is document footer. This enables you to have a footer document served up at the bottom of every page. This may be useful say for a free web hosting company who wishes to add an advert or link to their homepage to the bottom of every page. Or even if you wanted to include a navigation link but didn’t want to have to update every page when you added or changed a link.
We are getting deeper now and beyond the standard options you are likely to use. But I will give a quick overview of what else can be done too in the properties window. The next tab is ‘directory security.’ This enables you to have secure communications, restrict websites and IP addresses and others.
The ‘HTTP Headers’ allows you to set how often pages expire. If your content is only updated say every 5 minutes or for instance if you only want new messages posted in a guest book to be updated every 5 minutes then you can set it so pages in this directory are only refreshed every 5 minutes. A new page will be generated every 5 minutes and this version will be delivered from the cache until the next update.
‘Custom errors’ allow you to direct users to different pages depending on what error happens. For example if you wanted to send them to a personalised error page when a page cannot be found with a dancing Jesus saying “this page does not exist’ then you would click 404 and then click edit properties. You could then choose the custom file.
Finally ‘Server Extensions’ allows you to enable use of authoring such as Front Page change version control and performance and specify settings for things such as emails and security settings. Luckily if you get stuck there is a help button at the bottom of the properties window ;).