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
.htmlfiles, with theserver-parsedhandler. - Execute Perl or CGI scripts with extensions like
.plor.cgi, with thecgi-scripthandler.
Add a handler
- In Handler, type the name of the handler, for example
server-parsed. - In Extensions, type one or more extensions separated by spaces, for example
.html .htm. - 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
755permissions 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.
