With its Unix roots, the majority of administrators reconfigure Apache by directly editing the test file, and then either restarting the Apache process manually or through the apachectl command.

Some administrators will use the various Web-based editors, such as Webmin, for administering their site. Webmin is not a complete solution to the hands-on style of the httpd.conf file, but it provides an easier interface for the configuration of some of the core elements.

IIS provides a number of solutions. As well as the familiar command-line and text-based configurations, I can also use Web and GUI-based tools. These are all available locally and remotely.

Starting Up and Shutting Down

Without modifying the configuration file, Apache can only shut down or start up all the sites it has been configured to handle.

Within IIS, I can shut down and start up individual Web sites according to our needs without affecting other sites. To start or stop a particular site, right-click on the site in IIS Manager and select the appropriate option from the pop-up menu.

To start or stop specific sites from the command line, you need to use the iisweb tool. For example, to stop a specific site, you would use

C:\> iisweb /stop "Default Web Site"

To start it up again

C:\> iisweb /start "Default Web Site"

Note the use of double quotes around the Web site's name?required because the name contains spaces.

Interface-based Administration

The IIS Manager is the normal method of manipulation for IIS. I've already covered many of the facilities, wizards, and tools available in this environment throughout this book. IIS Manager provides some benefits over the typical text/configuration file interface in that it's often much easier to monitor and modify the configuration, particularly of multiple hosts.

Text-based Administration

If you prefer to administer your Web server by editing a text file, you can edit the IIS Metabase?the equivalent of the Apache httpd.conf file?directly.

For more information on how to edit the Metabase, see Chapter 4, "Management and Monitoring," p.65.

Remember that for it to work properly, you must switch on the Enable Direct Metabase Edit property for the server. This will allow you to directly edit the file while IIS is still running. Any edits should automatically be picked up and then reflected within IIS.

Command-line Administration

I've already demonstrated some examples of command-line based administration of a Web site in this chapter. You can, in fact, control most aspects of IIS through a combination of editing the Metabase and using the various command-line tools. See Chapter 4 for more information on the command-line tools and options available.

If you want to be able to perform command-line administration remotely through a Telnet connection, you'll also need to enable the Telnet service. To do this, perform these steps:

  1. Open the Services Manager through Start, Administrative Tools, Services.

  2. Double-click on the Telnet service to open its property page, as shown in Figure 8.1.

    Figure 8.1. Setting properties for the Telnet service.


  3. Change the Startup type to Automatic so that the service will start automatically when the server is started and then click the Start button to start the service now.


Just as with telnet under Unix, starting up telnet access under Windows also opens up the machine to potential abuse. Make sure that your firewall is configured to block telnet access?except from VPN connections or, at an absolute minimum, from specific IP addresses.

Once started, you'll be able to log in to the server and gain a started Command Prompt, just as if you'd started the Command Prompt application on the local host.