Defining Apache Handlers
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 types can be handled separately. Based on file name extensions, handlers can be specified without relation to the file type.
If you, for some reason, wish to change the default Apache files handling or define a new one, all you have to do is to select a handler and indicate the file extension(s) to be associated with it.
To define a handler:
- Go to Websites, click the name of the desired domain. At the opened page click Web Hosting Settings and then select the Advanced tab. Open Apache Handlers sub-item.
- At the User Defined Handlers area click on Add New Handler button. The screen with Add Handler fields will open.
The built-in handlers in the standard distribution are as follows:
- send-as-is – send file with HTTP headers as is.
- cgi-script – treat the file as a CGI script.
- imap-file – parse as an imagemap rule file.
- server-info – get the server configuration information.
- server-parsed – the server will execute SSI directives in the file.
- server-status – get the server status report.
- type-map – parse as a type map file for content negotiations.
- Select the handler type from the drop-down box and enter the extension(s) you wish to be handled by it.
- Click Submit. The new handler will be displayed in User Defined Handlers list.