Apache Handlers

This document contains information on using the cPanel Apache Handlers tool, which instructs the web server how to process files based on their extension.

A handler tells the web server what to do with a file type. For example, you can process .html files as Server Side Includes (SSI) pages or execute .pl files as CGI scripts. cPanel already includes handlers for standard formats; this tool is used to add your own.

Access: log in to cPanel from the client portal → Log in to cPanel, or at https://yourdomain.com/cpanel. Then open Advanced → Apache Handlers.

What is it for?

  • Use SSI in .html files, with the server-parsed handler.
  • Execute Perl or CGI scripts with extensions like .pl or .cgi, with the cgi-script handler.

Add a handler

  1. In Handler, type the name of the handler, for example server-parsed.
  2. In Extensions, type one or more extensions separated by spaces, for example .html .htm.
  3. Click Add.

The handler appears in User Defined Handlers. To remove it, click Delete next to it. On the same screen, System Defined Handlers shows those already configured on the server.

Important: do not use this tool for PHP. The PHP version is changed from the cPanel PHP selector. If you add a PHP handler manually, the site may stop working or the browser may download the .php files instead of executing them.

This tool is not used to indicate which file type the server sends to the browser, for example so that a format is downloaded or displayed. For that, the MIME Types tool is used.

Common issues

  • 500 Error after adding a handler: the handler name is not valid. Delete it and check how it is spelled.
  • The browser downloads files instead of displaying them: delete the handler you added for that extension.
  • A CGI script gives a 500 error: check that it has 755 permissions and that it is saved with Linux line breaks.

If you have questions about which handler to use, open a ticket from the client portal or inquire through the site's online chat.

  • 33 Users Found This Useful
Was this answer helpful?

Related Articles

How to send information from forms - FormMail

This article explains how to send form data to an email on your domain using FormMail Clone, the...

PHP Scripts - Activating PHP support for the service.

This document contains information on how to choose or change the PHP version for each domain...

I cannot view the images on my cPanel services subdomain

This document contains information to resolve the issue of images not displaying on a subdomain...

DomainKeys and SPF - Prevent identity spoofing.

This document contains information to protect your domain against identity spoofing, configuring...

DomainKeys for sending email

This document contains information to verify and activate DKIM, SPF, and DMARC on your domain...