What are Apache Handlers?

Apache Handlers control how the webserver manages certain types of file types and extensions. By default, there are rules in place to handle .perl and .shtml files, for example. You can add your own to adjust the behavior of the webserver.

How can I set up a new Apache Handler?

  1. Log in to cPanel.
  2. Click on Apache Handlers under Advanced.
  3. Under Create an Apache Handler, you can fill out the following fields to define your new handler:
    1. Handler, which can be set to any of the following:
      1. default-handler - Sends the file using the web server’s default handler.
      2. send-as-is - Sends the file as-is, no processing.
      3. cgi-script - Processes the file as a CGI script.
      4. imap-file - Parses the file as an imagemap rule file.
      5. server-info - This will send the server’s configuration information.
      6. server-parsed - This will send the server’s status information.
      7. type-map - Parses the file as a type-map file.
    2. Extension(s): This is where you will input the file extensions you want to be handled (e.g., “.html .php .txt”).
  4. Click Add.