After successfully installing the Personal Web Server (PWS), as you learned to do in the preceding
Tip, you have to work out how to stop and start the Web server and determine the location of the
server’s home directory. The tool you will use for this purpose is Personal Web Manager, which
you can open in different ways depending on your particular operating system.
The easiest way to start the Personal Web Manager is to double-click the program’s icon
in the Windows system tray (on the right-hand end of the Windows status bar). Or, on a
Windows 98 system, select Start | Programs | Microsoft Personal Web Server and then choose Personal
Web Manager.
After you start the application, the Personal Web Manager will display the program’s Main screen,
which contains the name of your Web server and the server’s home directory, similar to that shown in
Figure 1-9.
The Web manager displays the name of your Web server in blue text near the top of the page. Anyone
working at your computer or using another workstation on your local area network can use the Web
server name to view Web pages on your PWS. (You can change the name of your Web server simply
by changing the name of your PC on the Identification tab of the Control Panel, Network Properties
dialog box.) The Main screen of the Personal Web Manager also shows you the PWS’s root folder in
blue text just beneath the name of your Web server.
Knowing the name of the Web server and the home directory, you are ready to publish your Web
pages. Suppose, for example, that your computer’s name (and hence your PWS’s name) is konrad,
and the server’s home directory is C:\WebShare\wwwroot. If you place a Web page such as TestPage
.htm, for example, into the C:\WebShare\wwwroot folder on your computer, you (and anyone using a
The Main Screen of the Personal Web Manager program
workstation connected to your local area network) can display the Web page by typing http://konrad/
TestPage.htm into the Web browser’s Address field and then pressing ENTER.
Now, suppose you create a folder beneath your Web server’s home (root) directory, say HTDocs,
and then place inside the folder a Web page, such as TestPage2.htm. The pathname of TestPage2.htm
would be c:\WebShare\wwwroot\htdocs\TestPage2.htm. However, using a browser, you would display
the page by typing into the browser’s Address field the URL http://konrad/htdocs/TestPage2.htm
and then pressing ENTER.
In addition to browsers running on workstations attached to your local area network, you can let
computers anywhere in the world access your Web pages on the Internet. To do this, you will have to
connect your computer to the Internet and give those who want to visit your IP address. Bear in mind
that unless your ISP assigns to you a permanent IP address (normally at a monthly fee), your PWS
may have a different IP address assigned to it each time you connect your computer (and the Web
server) to the Internet.
If your ISP has not assigned your computer a static IP address, you can find out your current
IP address by executing ipconfig.exe. Ipconfig.exe runs under the MS-DOS command shell. To
start an MS-DOS session, select Start | Run. Windows, in turn, will display the Run dialog box. Within
the Run dialog box, type command.com into the Open field. Then, press ENTER or click OK. At the
MS-DOS command prompt type ipconfig.exe and then press ENTER. The ipconfig application, in turn,
will list your computer’s IP address directly above the Subnet Mask, as shown in Figure 1-10.
(You can run the Windows version of ipconfig.exe by selecting Start | Run and typing winipcfg.exe
into the Open field of the Run dialog box.) After you know the computer’s IP address, substitute the
The ipconfig program showing the computer’s IP address
IP address for the Web server name to access the server’s Web pages on the Internet. For example, given
a PC with an IP address of 24.234.31.218, to display the Web pages in the preceding example across the
Internet, you would use either of the following:
http://24.234.31.218/TestPage.htm
http://24.234.31.218/HTDocs/TestPage2.htm
After you determine the computer’s IP address, you can give this address to others. Bear in mind,
however, that unless your ISP allocates a static, permanent IP address to your computer, the IP address
will change each time you disconnect from and reconnect to the Internet. Moreover, the IP address might
change without your knowledge, even if you have a permanent (that is, always-on) Internet connection.
When your Web server’s IP address changes, those trying to view your Web pages using the old IP
address will no longer be able to do so—even though the PWS is running and your computer is connected
to the Internet.
The solution is to contact your ISP and ask for a static IP address. At present, your ISP cannot
assign your computer a static IP address if you are connecting to the Internet through a dial-up
connection on a standard phone line—you need an ISDN, DSL, or cable modem Internet connection.
After you receive your static IP address, you must enter the address into the TCP/IP Properties dialog
box on your computer. To do so, perform the following steps:
1. Select Start | Settings and then choose Control Panel. Windows, in turn, will open the Control Panel.
2. Within the Control Panel window, double-click the Network icon. Windows, in turn, will
display the Network dialog box.
3. Within the Configuration tab of the Network dialog box, click TCP/IP to select the protocol.
(If you are working on a Windows NT machine, you will find the TCP/IP protocol on the Protocols
tab of the Network dialog box instead.) Then, click Properties. Windows, in turn, will display
the TCP/IP Properties dialog box.
4. Within the Address tab of the TCP/IP Properties dialog box, click the Specify An IP Address
radio button. Then, enter the IP address and Subnet mask given to you by your ISP.
After you complete Step 4, click OK at the bottom of the TCP/IP Properties Dialog box and then click
OK at the bottom of the Network dialog box. Windows will then update your system settings and prompt
you to reset your computer. After your computer resets and you again connect your computer to the Internet,
the PWS will be accessible at the same (static) IP address on a permanent basis.
Once your computer has a static IP address, you can then purchase a domain name, either through
your ISP or from a domain name registrar such as VeriSign (http://www.NetSol.com). After you purchase
a domain name, such as MyWebServerName.com for example, ask your ISP to associate your domain
name with your static IP address in the ISP’s Domain Name Server (DNS). With the domain name
pointing in place, visitors throughout the Internet will be able to view the Web pages on your PWS
by using either your IP address (as shown previously) or by addressing the Web server with your
domain name as either of the following:
http://www.MyWebServerName.com/TestPage.htm
http://www.MyWebServerName.com/HTDocs/TestPage2.htm
If you have a dial-up connection to the Internet or would rather not pay for a static IP address and
use one of your computers as a Web server, you can have your ISP host your Web site for you. Many
ISP’s offer 5–10MB (or more) of Web space as part of your monthly fee for Internet access. Contact
your ISP or a domain name registrar (such as VeriSign) for information on the Web-site hosting options
they offer. If you have your ISP or another company host your site, you will simply copy the Web pages
you want to publish to your site’s folder hierarchy on the host company’s hard drive instead of the
PWS’s root folder (and root subfolders) on your hard drive.
Note that after you install the PWS, Windows automatically starts the Web server each time you
restart your computer. To stop the Web server, click the Stop button below the Web server name in
the upper half of the Main section of the Personal Web Manager. (After you stop the PWS, the server
will remain halted until you manually restart the Web server—even if you restart your computer in the
interim.) To restart the PWS, click the Start button that replaced the Stop button on which you clicked
to stop the Web server. (You can also stop or pause the PWS by selecting Properties | Stop Service or
Properties | Pause Service, and then restart the Web server by selecting Properties | Start Service
or Properties | Continue Service.)
0 comments:
Post a Comment