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

Configuring and Using the Apache HTTP Web Server on a Windows XP PC

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.

TABLE OF CONTENTS:
  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
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

What is the Apache HTTP Web Server exactly? 

It is a piece of software that can basically create a virtual web server on your PC.  The program is open source, which means that as a developer, you can download the source files and experiment with changes to the code in the hope of modifying the program for the better.  It also means that the program has a General Public License, which to you and me, means for free!  The great thing about this (and most other open source software available these days), is that you don’t have to download the source code and try to install it from that.  All of us non-software developers out there can download a nicely packaged MSI or WIP file.  MSI, by the way, stands for MicroSoft Installation, and WIP for Windows Installer Package.  So we get a powerful program, for free, that we can install with minimum effort.  You can of course give a financial donation to the HTTP project, which, when you’re making software for nothing, you kind of rely on in order to keep going.  Feel free to, at your own discretion. 

So what’s the point in having it? 

When you connect to the Internet and type, for example www.hotmail.com, you’re telling your browser to locate the hotmail sub-domain on the .com top level domain.  Testing HTML pages you’ve written yourself and haven’t uploaded is a pretty standard operation; you open Internet Explorer (or whichever browser you happen to be using) and open the page; simple.  Most HTML editors have a ‘preview in browser’ button just for this. But how do you test PHP code? Or that little CGI script that you’ve written? The answer lies within Apache. It acts as a local server; you put any pages or scripts that you want to test in a specified directory, and in the address bar, type something like http://localhost/pagethatyouwanttotest.htm

Your browser then requests the page from the server called localhost, or whatever you’ve configured it to, in the same way that it would if you were connected to the Internet.  Any script files referenced in the page are executed on the server and the results passed to the browser.  This is an excellent resource for anyone developing web applications in PHP, Perl or ASP, and lets you see pretty much exactly what any visitors to your site will see once it’s live.  You can also use the Apache HTTP Web Server to host your website on the Internet, as many people have chosen to do, but we won’t go into that here because it’s way past the scope of this article.  We’ll concentrate solely on using it on your desktop PC purely for testing code.



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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

APACHE ARTICLES

- 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: