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
-
Log in to cPanel.
-
On the Tools page → Advanced section, click Apache Handlers.
-
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
-
-
-
Click Add.
-
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
-
Log in to cPanel.
-
Go to Tools → Advanced → Apache Handlers.
-
Under User Defined Apache Handlers, locate the handler you want to remove.
-
Click Delete.
-
cPanel deletes the custom handler.
You cannot delete system‑wide Apache handlers, only custom ones you have created.
Notes
|