How to Create an Apache Handler in cpanel

In cPanel configurations, there is an Apache Handler which entails how Apache Web Server execute process of a file extension.

Following are some example of file extensions which can be configured for Apache to execute:

  • .cgi

  • .plx

  • .ppl

  • .perl

  • .shtml

The cPanel grants an Apache Handlers interface which enable any account user to upload a file extension with an existing Apache handler.

Login to cPanel >> Home >> Advanced >> Apache Handlers.

The Apache receives requests from a browsers and determines how to handle the requested files.

Following is an example:

During the processes, cgi-script handler instructs Apache to process the cgi script and the server-pasrsed also instruct Apache to process Server Side Includes (SSI).

Following is the list of cPanel built-in handlers:

* Default-handler

* Send-as-is

* cgi-script

* Imap-file

* Server-info

* Server-parsed

* Server-status

* Type-map

Following
Must be Considered
Before
Creat
e
an Apache Handler

a- Access to cPanel.

b- Ensure your hosting provider has enabled Apache Handlers.

c- Your Apache Server supports the handler you intend to use.

d- Detect and know the file extension you want Apache to process.

e- Clearly understand what the selected handler does.

Steps
to Create the Apache Handlers:

Log in to your cPanel account.

Cpanel >> Home Advanced >> Apache Handlers

 

Test the Apache Handler after created it.

For instance, create a file with .cgi extension i.e. test.cgi and log on to:

https://yourdomain.com/test.cgi

In Summary:

cPanel

| |

Advanced

| |

Apache Handlers

| |

Enter Handler

| |

Enter Extension

| |

Add

| |

Test

Important Note: cPanel Apache Handlers interface do not grant the ability to create any new or custom Apache handler but can enable to assign an existing Apache handler to one or more file extensions.

The cPanel Apache Handler is used to tell Apache how to process a particular file extension. It is especially useful for file types such as CGI scripts and Server Side Includes.