Huge Collections of Software Manuals and Knowledgebase

GreatManuals.com
Huge Collections of Software Manuals and Knowledgebase

 
Home Contact us Request to publish your help manuals Request to remove your help manuals

Introduction
 » HSLAB HTTP Monitor
 » What's New?
 » System Requirements
Before You Begin
 » How it Works?
 » Why this Software?
Working with Program
 » Main Window
 » Server Details
 » Table View
 » Diagram View
 » Monitor Options
 » Apache Configuration Wizard
 » Server Snapshots
 » Server Profiles
 » Detection Threshold & Alarms
Advanced Filtering Options
 » Advanced Filtering Options
 » Regular Expression Options
 » Simple Regexp Syntax
 » Regular Expression Syntax
 » Match Options
Related Apache Documents
 » Apache Core Features
 » Module mod_status
 » Access Control by URL
 » Apache's Handler Use
 » Apache Performance Notes
Registration & Support Details
 » Distribution of Evaluation Version
 » Registration
 » Enter Registration Code
 » Company Info
 » Support
 » Report Bug
 

Apache's Handler Use

What is a Handler?

A "handler" is an internal Apache representation of the action to be performed when a file is called. Generally, files have implicit handlers, based on the file type. Normally, all files are simply served by the server, but certain file typed are "handled" separately. For example, you may use a type of "application/x-httpd-cgi" to invoke CGI scripts.

Apache 1.1 adds the additional ability to use handlers explicitly. Either based on filename extensions or on location, these handlers are unrelated to file type. This is advantageous both because it is a more elegant solution, but it also allows for both a type and a handler to be associated with a file (See also Files with Multiple Extensions)

unerase picture recover digital photos professional data recovery
usb media data recovery drive recovery key drive file undelete
best data recovery program deleted photos recovery restore files

Handlers can either be built into the server or to a module, or they can be added with the Action directive. The built-in handlers in the standard distribution are as follows:

server-status: Get the server's status report (mod_status)

Directives

  • AddHandler
  • SetHandler

AddHandler

Syntax: AddHandler handler-name extension extension...
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Base
Module: mod_mime
Compatibility: AddHandler is only available in Apache 1.1 and later

AddHandler maps the filename extensions extension to the handler handler-name. This mapping is added to any already in force, overriding any mappings that already exist for the same extension. For example, to activate CGI scripts with the file extension ".cgi", you might use:

AddHandler cgi-script cgi

Once that has been put into your srm.conf or httpd.conf file, any file containing the ".cgi" extension will be treated as a CGI program.

SetHandler

Syntax: SetHandler handler-name
Context: directory, .htaccess
Status: Base
Module: mod_mime
Compatibility: SetHandler is only available in Apache 1.1 and later.

When placed into an .htaccess file or a <Directory> or <Location> section, this directive forces all matching files to be parsed through the handler given by handler-name. For example, if you had a directory you wanted to be parsed entirely as imagemap rule files, regardless of extension, you might put the following into an .htaccess file in that directory:

SetHandler imap-file

Another example: if you wanted to have the server display a status report whenever a URL of http://servername/status was called, you might put the following into access.conf:

<Location /status>
SetHandler server-status
</Location>

Home | Contact us | Request to publish your help manuals | Request to remove your help manuals