Home arrow Apache arrow Page 4 - Configuring and Using the Apache HTTP Web Server on a Windows XP PC

Testing - Apache

Author Dan Wellman explains what the Apache HTTP web server is and how it acts as a local server so you can test PHP code or CGI scripts you've written to see how they will look live. Wellman concentrates on using it on your desktop PC purely for testing code.

  1. Configuring and Using the Apache HTTP Web Server on a Windows XP PC
  2. Get the Software and Set up a Directory Structure
  3. Opening the File and Making Modifications
  4. Testing
By: Dan Wellman
Rating: starstarstarstarstar / 122
May 24, 2004

print this article



Once you have completed the above, you’ll need to do a couple of quick tests to check that you’ve configured Apache correctly.  Firstly, create a standard HTML document with ‘Congratulations on a fine piece of configuration’ in between the <body tags> in the www folder, and call it index.html

Now open your browser and type:


Your self-praise should be displayed.  In order to test SSI, create the following file in Notepad and save it as test.shtml:

SSI Test Successful!


<!--#include virtual="/index.html" -->


Now type http://localhost/test.shtml in the address bar, and you should see a page with; ‘SSI Test Successful!’ at the top, followed by ‘Congratulations on a fine piece of configuration’ in- between two horizontal lines.  

To test cgi; create the following in Notepad:



ECHO This is a batch file





Save it as test.bat in the cgi folder and in the browser address bar type;


This should execute the batch file, or at the very least give you an Open or Save dialogue box.  If you get a ‘Page cannot be displayed error’, you may need to install XP service pack 1, which can be found on the Microsoft Update site.

Lastly, to test PHP, create the following file in Notepad and save it as test.php in the www directory:

  echo "It works!<br>n";

Now type http//localhost/test.php in the browser address bar.  You should see a page with ‘It Works!’ at the top followed by a lot of information regarding PHP.  That’s it!  You’re all set to begin PHP or script development.

>>> More Apache Articles          >>> More By Dan Wellman

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Apache Unveils Cassandra 1.2
- Apache on ARM Chips? Dell and Calxeda Help M...
- The Down Side of Open Source Software
- VMware Unveils Serengeti for Apache Hadoop
- SAP Takes Steps to Improve Hadoop Integration
- Looking to Hone Apache Hadoop Skills?
- How to Install Joomla on WAMPP
- Working with XAMPP and Wordpress
- GUI Available for Apache Camel
- Reduce Server Load for Apache and PHP Websit...
- Creating a VAMP (Vista, Apache, MySQL, PHP) ...
- Putting Apache in Jail
- Containing Intrusions in Apache
- Server Limits for Apache Security
- Setting Permissions in Apache

Developer Shed Affiliates


Dev Shed Tutorial Topics: