Webserver Notes
Apache Web Server - win32
Apache is a web server. This is a program that runs in the background
on a web-server (or your PC) and listens out for HTTP
requests from browsers.
When it gets a request it retrieves the requested page from wherever it is
stored and returns it to the browser via the HTTP
protocol.
Apache is a fairly sophisticated application, this is not the place for a detailed explanation of its configuration, suffice it to say that you can direct the configuration to specific directories on your PC and these will be 'served' as your website. There are many websites out there that deal specifically with Apache and its usage and configuration. Probably the very best one can be found at »http://www.apache.org
There are also a number of other useful features and functionalities that come with running Apache:
- SSI: (Server Side Includes) It is quite common for all pages on a website to have a similar appearance which involves repeating the same HTML code in every page. Rather than code each and every page individually it is possible to write this section of code once to a separate file and then configure Apache to stream the contents of this file into the HTML page output. This makes sharing code and global changes to the website much simpler, especially important once the site gets beyond a certain size.
- Security: It is possible to designate some sub-directories as secure areas requiring a password to access. This is easily set up in Apache and a very useful feature.
- Redirections: where a specific request can be redirected elsewhere.
- Error handling: on receipt of a 404 (not found) error, Apache can be configured to direct output elsewhere, usually to a specific 404 page or error handling program.
- CGI: last but by no means least, Apache allows scripts in a designated area (the cgi-bin) to be set as executable programs: CGI programs. This is by far the most powerful application of your own webserver although this will also require you to install Perl. (or PHP or any other equivalent)
Apache is freely downloadable from »http://httpd.apache.org/download.cgi
The latest version is 2.0.52, however you may prefer a slightly older but stable and well supported for win32 version 1.3.33 (Not that there is anything wrong with 2.0!)
To run it under Windows you will need to locate the Win32 Binary (Self extracting):
apache_1.3.33-win32-x86-no_src.exe
This is a
4.91Mb download and installs using the
Microsoft Installer that comes with Windows. Once the file has
downloaded double click it and the rest should be plain sailing.
See 'Win32 Apache Installation and Configuration Guide' for details on how to get your Apache up and running.