Home arrow Apache arrow Page 4 - Getting Started with Apache 2.0 Part III

Et Cetera - Apache

In this third and final installment of our "Getting Started with Apache 2.0" series, you will learn how to configure the Apache server as a "proxy server" for your local network, how to make use of "URL Re-writing," and much more.

  1. Getting Started with Apache 2.0 Part III
  2. Personalized Websites
  3. URL Rewriting
  4. Et Cetera
By: Harish Kamath
Rating: starstarstarstarstar / 13
March 28, 2005

print this article



In this penultimate section of this article, I'll introduce some offbeat Apache Web server modules.

Let me start with the "mod_usertrack" module that allows you to track the navigation of the user across the website by setting a "cookie" on the client. Note that you have to compile this module into Apache by specifying the "--enable-usertrack" option at compilation time.

Now, let me outline the directives that govern the behavior of this module:

CookieTracking On
CookieName MySite
CookieExpires "1 month"
CookieStyle RFC2965
CookieDomain .mysite.com

For starters, the "CookieTracking" directive must be set to "On" in order to activate the module, because compiling the "mod_usertrack" module into the binary does not activate this feature. The following directives control the creation of cookies on the client:

  • CookieName: allows you to specify a name.  The default value is "Apache."

  • CookieExpires: stores the duration when the cookie should expire.

  • CookieStyle: the format of the cookie header field. Valid values include "Netscape," "RFC2109" or "RFC2965."

  • CookieDomain: the domain associated with the cookie. By default, no domain is associated with the cookie if this directive is absent in the configuration file. Note that value must always begin with a "dot".

Next, you have the "mod_speling" module - yes, I've typed the name of the module correctly here - that allows the Apache Web server to correct any spelling mistakes (only one per request) in the URL. Once again, the "--enable-speling" option ensures that this module is compiled into Apache, statically.

There is only important directive that you need to keep in mind:

# Spell Check module - turned on
CheckSpelling On

Note that the server will attempt to locate file with only a single misspelling. If there is more than one result that match the required criteria, the following output is displayed in the browser:

Multiple Choices

The document name you requested (/tes.html) could not be found on this server. However, we found documents with names similar to the one you requested.
Available documents:
 /test.html (character missing)
 /tesr.html (character missing)

Finally, there is the "mod_info" module that allows you to learn more about the configuration of the Web server. Once again, you'll have to include the "mod_info" module in the Apache executable by specifying the "--enable-info" option to the "configure" command.

Next, you must update the "httpd.conf" file with the following entries:

<Location /server-info>
 SetHandler server-info
 Order Deny,Allow
 Deny from all
Allow from

Restart the Web server and try to access the following URL: "http://www.mysite.com/server-info".

Note that access is restricted to the computer, whose IP address is "", as a security precaution.

A counterpart of the "mod_info" module is the "mod_status" module - compiled into Apache by default. You can learn more about this module at the following URL: http://httpd.apache.org/docs-2.0/mod/mod_status.html.

In fact, you can read up on all modules explained during the course of this three part series by pointing your browser to the following URL: http://httpd.apache.org/docs-2.0/mod/.

Au Revoir

That's about it for this series on "Getting Started with Apache 2.0." If you're interested in learning more about latest (and most stable) incarnation of Apache, take a look at the following links:

The Apache Group Website: http://www.apache.org

The Apache Project Website: http://httpd.apache.org

Apache HTTP Server 2.0 Online Documentation: http://httpd.apache.org/docs-2.0/

New features with Apache 2.0: http://httpd.apache.org/docs-2.0/new_features_2_0.html

Listing of binary distributions: http://apache.gr-linux.com/httpd/binaries/

Apache 2.0: The Internals of the New, Improved - http://www.linuxjournal.com/article/4559

An Amble Through Apache Configuration -  http://www.onlamp.com/pub/a/apache/2000/03/02/

Till next time, have fun!

Note: All examples in this article have been tested on Linux/i586 with Apache 2.0.52, MySQL 3.23 and PHP 5.0.3. Examples are illustrative only, and are definitely NOT meant for a production environment.

>>> More Apache Articles          >>> More By Harish Kamath

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: