13.06.2015 Views

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SetHandler<br />

Much like <strong>the</strong> AddHandler directive, but specifies that all files (or URLs) in <strong>the</strong> given scope (usually a<br />

Location, Files, or Direc<strong>to</strong>ry section is <strong>to</strong> be handled by <strong>the</strong> specified handler.<br />

<br />

SetHandler server-status<br />

<br />

The server-status handler is provided by <strong>the</strong> module mod status.<br />

RemoveHandler<br />

Removes <strong>the</strong> action of a handler from a specified file extension.<br />

RemoveHandler .html<br />

Action and Script<br />

Provides for <strong>the</strong> creation of cus<strong>to</strong>m handlers, by mapping a file type <strong>to</strong> a CGI URL.<br />

There are two ways that this can be handled.<br />

You can map an action <strong>to</strong> a particular type (MIME type) of file using just <strong>the</strong> Action directive:<br />

Action image/gif /cgi-bin/watermark.cgi<br />

Or, you can map a file extension <strong>to</strong> an Action in two steps:<br />

AddHandler my-handler .gif<br />

Action my-handler /cgi-bin/watermark.cgi<br />

These two techniques are essentially equivalent. The latter creates a named handler, and <strong>the</strong>n defines that<br />

handler <strong>to</strong> be <strong>the</strong> specified CGI program.<br />

The Script directive is a little bit different, and seldom used. Script specifies that a particular script is <strong>to</strong><br />

be used every time a particular HTTP method is used in a request.<br />

82

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!