HomeApache Page 3 - Installing and Configuring Apache 2 on a Windows XP Machine
Configuring - Apache
Apache 2 represents quite a change from previous versions. If you have set up a previous version of Apache on a Windows XP PC, you will be interested in setting up the new version. Dan Wellman shows how to set up and configure Apache 2 on a Windows XP PC to give you a development environment that will allow you to test your PHP and other dynamic web technologies before taking them live.
Now go to the Start menu and select Edit the Apache httpd.conf Configuration File from the Apache program group. This will open the main configuration file used by Apache. You’ll need to scroll down to section two and find a directive called DocumentRoot. Change the value to C:/folderyoujustcreated. A little bit further down, you’ll see a <directory “C:/Program Files/Apache Group/Apache2/htdocs”> directive which will also need to be changed to whatever the DocumentRoot was set to.
Now save the file, restart the server and open a browser window. Type http://localhost in the address bar again and the HTML file you just created should be displayed. If instead, you see a directory style listing with Index of / at the top of the page, it means that you saved the HTML file with a HTM extension. To correct this, open the httpd.conf file again and scroll down past the changes you just made to the DirectoryIndex directive. Add index.htm to the end of the line and again save the file and restart the server. Refresh the page and you will see the proper document.