Running Your Own Web Server


With the Windows XP operating system, you do not have a web server installed by default. You have to install the web server Internet Information Server (IIS) yourself. IIS isn't automatically installed with Windows XP because workstations do not typically serve content via the Web. Security concerns also drive the decision to not install a web server by default. With a web server installed, the so-called attack footprint is larger. This essentially means that hackers have more of an area on your computer to try to break into. Web server security flaws have been the source of some notorious security breaches, and the exclusion of this software from desktop systems limits the vulnerability.

Understanding the World Wide Web

The World Wide Web was invented as a way for scientists to exchange research information. Tim Berners-Lee invented the World Wide Web in 1989 as a way to exchange hypertext media on a global scale. While working at the CERN particle physics laboratory, Berners-Lee wrote the first web browser and server in 1990, and the world has been drastically altered since. In the early days of the Web, e-commerce was unheard of, and the Web was mostly used for research. I recall asking a manager to invest in an Internet connection back in the early 1990s and being told that the Internet was a neat toy, but it wouldn't amount to anything commercial. Looking back now, we can see how far this technology has come in a relatively short time.

The Web is a simple enough concept: A client requests something from a server, and the server responds with the data requested. The data in question is essentially a document with tags that identify how the text should appear on the page. These tags are part of Hypertext Markup Language (HTML), and the protocol that is used to transfer documents between clients and servers is called Hypertext Transfer Protocol (HTTP). You should keep in mind that HTTP by itself can accomplish nothing; it relies on TCP/IP to route data to the appropriate computers. You should also keep in mind that TCP/IP is unable to perform its task without the underlying physical connection of your wired or wireless network cards, switches, and/or hubs. Everything in the Web is connected, and the entire network infrastructure is made up of individual components that rely on the functionality provided by other components in order for the whole thing to work.

Installing IIS

As mentioned previously, before you can host a web server, you need to have a web server installed. Because you're running Windows XP, IIS is the most logical server choice because it is provided with the operating system.

Note

You can use other web servers rather than IIS. The Apache server is probably the most popular alternative, and it is available free of charge from www.apache.org. The reasons for installing other web servers have to do with application and feature compatibility and support. If you end up getting into any serious web development, these issues may become a concern, but for your home network, IIS should be adequate. You should just be aware that there are alternatives available.


To install IIS, follow these steps:

1.

Select Start, Control Panel. The Control Panel appears.

2.

Click Add or Remove Programs. The Add or Remove Programs window appears (see Figure 8.1).

Figure 8.1. The Add or Remove Programs window.


3.

Click Add/Remove Windows Components in the left side of the window. The Windows Components Wizard appears.

4.

Scroll down to and the click the check box next to Internet Information Services (IIS), as shown in Figure 8.2, and then click Next. The Completing the Windows Components Wizard page appears.

Figure 8.2. The Windows Components Wizard.


5.

Click Finish.

6.

Close Add or Remove Programs and then close Control Panel.

Note

You need access to either your Windows XP CD or a location on your hard disk where you have copied the contents of that CD. You are prompted at this point to provide the CD (or point to the correct hard drive location) if you don't already have the CD in your computer. When you have checked the box for IIS, you should click the Details button to see what else is being installed on your computer. For example, the SMTP service will be selected for installation, and for the purposes of a home network where you will simply be serving web pages, this is unnecessary. You can clear the check box next to SMTP to eliminate the installation of this component and reduce the security exposure that would have otherwise resulted. Because this project will be created using Microsoft FrontPage, you need to install the FrontPage Server extensions by clicking the check box next to that option.


Exploring IIS

Now that you have IIS installed, it's time to see what you have. Open Internet Explorer, either from the Start menu or by double-clicking its desktop icon. To see the contents of your local web server, type http://localhost into the Address field of Internet Explorer and then press Enter. The content that your web server offers up comes from the c:\inetpub\wwwroot folder of the local hard disk of your computer. So any time you want to make a web page available, you need to place the file in that location. After you load the web page, the screen shown in Figure 8.3 should appear.

Figure 8.3. The default IIS web page.


You should notice that you now have two web browser windows open: one that confirms that your web server is now installed and running and another that shows the IIS online help system. You can use the online help system to learn more about IIS. The other page that's now open lets you know that anyone accessing the page on your web server across the network will receive a page notifying them that your site is under construction. To see what it looks like from another machine, enter http://computername in the Address field of the web browser on another computer on your network. You should see a page similar to the one in Figure 8.4

Figure 8.4. The Under Construction web page.


Looking at IIS Configuration

Now that you have installed and begun to explore IIS, you are almost ready to create your own website. But first, you need to take a brief look at managing your web server. Follow these steps to start the IIS management console:

1.

Select Start, Control Panel to open the Control Panel.

2.

If you're in Category view, select Performance and Maintenance and then Administrative Tools. If you're in Classic view, click Administrative Tools. The Administrative Tools page appears.

3.

Double-click Internet Information Services. The Internet Information Services page appears.

4.

Expand your computer and then expand the Web Sites folder by clicking on the plus sign next to each.

5.

Right-click Default Web Site and then click Properties. The Default Web Site Properties page appears.

6.

Select the Documents tab. The Documents tab shows what documents are served by default if a browser does not specify a particular document in the Address field. The order in which these documents are listed is their priority order. If you have both a default.htm and a default.asp file in the directory, default.htm is returned first.

A Note About Security

If your copy of Windows XP has been updated to include Service Pack 2, you will likely not be able to access your web server. This is because Service Pack 2 includes the Windows Firewall, which blocks such traffic. You therefore need to configure your web server to allow communications on TCP port 80, which is the default communications port for HTTP. To configure Windows Firewall in this way, follow these steps:

1.

Open the Control Panel by selecting Start, Control Panel and then click Security Center. The Windows Security Center appears.

2.

Under Manage Security Settings For, click Windows Firewall. The Windows Firewall page appears.

3.

Select the Advanced tab and then click Settings under Network Connection Settings. The Advanced Settings page appears.

4.

Click the check box next to Web Server (HTTP) and then click OK twice.

5.

Close the Security Center and then close the Control Panel.

This procedure opens port 80 so that your web server can receive requests for web pages and respond accordingly.


The rest of the tabs in the IIS Manager control various aspects of the web server's operation and/or security settings. While they are very important, these topics are beyond the scope of this book. You can read the online help to get a better understanding of these and other aspects of IIS.




Create Your Own Home Networks
Create Your Own Home Networks
ISBN: 0672328321
EAN: 2147483647
Year: 2003
Pages: 82
Authors: Eli Lazich

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net