Knowledge Base

Apache Handlers in cPanel

Apache Handlers in cPanel

  • Log in to cPanel

  1. Visit your cPanel login page (for example, https://yourdomain.com:2083).

  2. Enter your username and password.

  3. Click Log in to access your cPanel dashboard.

  •  Access the Apache Handlers Interface

  1. In the Advanced section of the cPanel home screen, click Apache Handlers.

  2. You’ll see two main sections:

    • Create an Apache Handler – to add new custom handlers.

    • User Defined Apache Handlers – to view, edit, or remove handlers you’ve created.

  • Create a New Apache Handler

  1. Under Create an Apache Handler, locate the form fields:

    • Handler – Enter the name of the handler you want to assign (for example, application/x-httpd-php).

    • Extension(s) – Enter one or more file extensions that will use this handler, separated by spaces (for example, php5 phtml).

  2. Click Add to create the handler.

The new handler will now appear in the User Defined Apache Handlers table.

  • Manage or Remove Existing Handlers

In the User Defined Apache Handlers section, you can:

  • View your existing custom handlers.

  • Delete a handler by clicking the Delete link next to it.

Note: You cannot edit or remove system-defined handlers — only the ones you create manually.

  •  Test Your Handler

After creating a handler:

  1. Upload a file that uses one of the specified extensions to your website.

  2. Access the file in a browser (for example, https://yourdomain.com/test.php5).

  3. Verify that it runs or displays as expected.

If the file downloads instead of executing, check the handler name or file extension for typos.


Common Examples

File Type Handler Extension(s)
PHP Files application/x-httpd-php php5 phtml
CGI Scripts application/x-httpd-cgi cgi pl
Server-Side Includes server-parsed shtml

 

Please rate this article to help us improve our Knowledge Base.

0 0