Apache
  Home arrow Apache arrow Page 4 - Getting Started with Apache 2.0 Part III
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
APACHE

Getting Started with Apache 2.0 Part III
By: Harish Kamath
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 13
    2005-03-28


    Table of Contents:
  • Getting Started with Apache 2.0 Part III
  • Personalized Websites
  • URL Rewriting
  • Et Cetera

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Getting Started with Apache 2.0 Part III - Et Cetera
    ( Page 4 of 4 )

    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 192.168.0.1
    </Location>

    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 "192.168.0.1", 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/
    configuring_apache.html

    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
     

       

    APACHE ARTICLES

    - Creating a VAMP (Vista, Apache, MySQL, PHP) ...
    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek