Datasheet

1. Locate the section of the file that resembles this text:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot “C:/Program Files/Apache Group/Apache2/htdocs”
2. Change the last line of this section to
DocumentRoot “C:/Program Files/Apache Group/Apache2/test”
Notice that this uses forward slashes instead of backslashes.
3. Locate the section of the file that resembles this text:
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something’s not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory “C:/Program Files/Apache Group/Apache2/htdocs”>
4. Change the last line of this section to
<Directory “C:/Program Files/Apache Group/Apache2/test”>
5. Save your file and restart Apache so it can recognize the changes you made to the config
file. (Make sure you have created this directory before restarting Apache or you will get an
“Operation Failed!” error.)
Now create a small “test” program to make sure Apache can find your directory.
Open Notepad and type the following:
<HTML>
<HEAD>
<TITLE>Apache testing</TITLE>
</HEAD>
<BODY>
If this works, we did it!
</BODY>
</HTML>
Save this as index.html in the “test” directory you created. Now open your browser, and type http://
localhost. You should see the screen shown in Figure 1-1.
12
Chapter 1
04_579665 ch01.qxd 12/30/04 8:09 PM Page 12