# Configuring custom Apache handlers in cPanel

> Add a custom Apache handler in cPanel to tell the web server how to process files with a particular extension.

Source: https://helpcenter.ruachost.com/cpanel/advanced/configuring-custom-apache-handlers-in-cpanel/

**Apache Handlers** tell the web server how to process certain file types. By default, Apache is configured to handle common extensions (e.g., `.pl` for Perl scripts). With cPanel, you can add **custom handlers** to define how files with specific extensions should be executed.

## Why Use Apache Handlers?

- Extend Apache’s functionality to support custom file types.
- Run scripts with non‑standard extensions.
- Control how your server interprets files.

## Adding a Custom Apache Handler

1. **Log in to cPanel.**
2. On the **Tools page → Advanced section**, click **Apache Handlers**.
3. Under **Create an Apache Handler**, fill in:

   - **Handler** → The name of the handler (e.g., `cgi-script`).
   - **Extension(s)** → The file extension(s) you want the handler to process.

     - Example: `.script`
4. Click **Add**.
5. cPanel adds the custom handler.

**Example:** If you want files ending in `.script` to be processed as Perl files, you can assign the `cgi-script` handler to `.script`.

## Deleting a Custom Apache Handler

1. **Log in to cPanel.**
2. Go to **Tools → Advanced → Apache Handlers**.
3. Under **User Defined Apache Handlers**, locate the handler you want to remove.
4. Click **Delete**.
5. cPanel deletes the custom handler.

You cannot delete system‑wide Apache handlers, only custom ones you have created.

> **Note:**
- Apache handlers affect how the **server** processes files, not how the browser interprets them.
- Do not confuse **MIME types** with Apache handlers:

  - **MIME types** → Tell the browser how to handle files.
  - **Apache handlers** → Tell the server how to process files.
- Misconfigured handlers can cause your site to behave unexpectedly.
