Information on Apache Handlers - PowerPoint PPT Presentation

About This Presentation
Title:

Information on Apache Handlers

Description:

The way in which a site’s Apache web server software manages certain types of files and extensions is controlled by Apache handlers. – PowerPoint PPT presentation

Number of Views:40
Slides: 12
Provided by: htshosting
Category: Other

less

Transcript and Presenter's Notes

Title: Information on Apache Handlers


1
Information on Apache Handlers
2
Table of Contents
  • Apache Handlers
  • Built-in Handlers in Standard Distribution
  • Function of Apache Handlers
  • Creating an Apache Handler
  • How to Remove an Apache handler?
  • Modifying Static Content Using a CGI Script
  • Files with HTTP Headers

3
Apache Handlers
  • A handler refers to an internal Apache
    representation of the action that is to be
    performed at the time when a file is called.
    Usually, files have implicit handlers, depending
    on the file type. Generally, the files are served
    by the server but there are certain types of
    files that are handled separately.
  • It is possible to configure handlers explicitly,
    depending on either filename extension or on
    location, without any relation to file type.
  • Handlers can either be included in a module or be
    built into the server, or these can be added with
    the Action directive.

4
Built-in Handlers in Standard Distribution
  • The built-in-handlers in the standard
    distribution of cPanel are mentioned below.
  • default-handler - It sends the file and uses the
    default handler of Apache for static content.
  • send-as-is - It sends the file with HTTP headers
    intact.
  • cgi-script It handles the file as a CGI script.
  • imap-file It parses the file as an imagemap
    rule file.
  • server-info It retrieves the configuration
    information of the server.
  • server-parsed Parses the file for server-side
    includes.
  • server-status It retrieves the status report of
    the server.
  • type-map Parses the file as a type map file.

5
Function of Apache Handlers
  • Apache handlers control the way in which a sites
    Apache web server software manages certain types
    of files and their extensions. CGI scripts and
    server-parsed files are handled by Apache. Apache
    can be configured for using an existing handler
    for the purpose of handling a new file type. For
    this purpose, you need to add manually the
    handler and the extension in the interface.
  • To digress, with regard to web servers, VPS
    (Virtual Private Servers) are in high demand due
    to the benefits that they offer. Professional web
    hosting companies, including HTS Hosting, provide
    Windows Managed VPS, Linux Managed VPS, Windows
    Self-Managed VPS, and Linux Self-Managed VPS.

6
1-800-123 -8156
  • Whoa! Thats a big number, arent you
    proud?

7
Creating an Apache Handler
  • You need to carry out the following steps for
    adding an Apache handler
  • Enter the handler name in the text box, Handler.
  • Enter the file extension in the text box,
    Extension(s).
  • A file extension refers to the letters after the
    dot (.) in a file name.
  • Space-separate multiple extensions.
  • Click Add.
  • It needs to be mentioned here that the interface
    does not let you create custom Apache handlers

8
How to Remove an Apache handler?
  • You need to carry out the following steps in
    order to remove a user-defined handler
  • Click Delete, that is under the Remove heading,
    for the appropriate handler in the User Defined
    Apache Handlers table.
  • Click Yes.
  • It needs to be specified that you cannot remove
    those file extensions that are handled
    automatically by Apache.

9
Modifying Static Content Using a CGI Script
  • The below-mentioned directives will result in the
    requests for files with the html extension to
    trigger the launch of the footer.pl CGI script.
  • Action add-footer /cgi-bin/footer.pl
  • AddHandler add-footer .html
  • Post that, the CGI script has the responsibility
    of sending the document that was requested
    originally, which is pointed to by the
    PATH_TRANSLATED environment variable. It is also
    responsible for ensuring that the desired
    modifications or additions take place.

10
Files with HTTP Headers
  • The send-as-is handler gets enabled by the
    following directives
  • ltDirectory "/web/htdocs/asis"gt
  • SetHandler send-as-is
  • lt/Directorygt
  • The send-as-in handler processes all files in the
    /web/htdocs/asis/ directory, regardless of their
    filename extensions.
  • .

11
Thanks!
  • ANY QUESTIONS?
  • www.htshosting.org
Write a Comment
User Comments (0)
About PowerShow.com