How to configure custom Apache handlers in cPanel
This article describes how to use cPanel to configure custom Apache handlers for your web site. Apache handlers are used to specify how certain file types are processed by the server.
About Apache handlers
Apache is an open-source web server that is used to serve your web site's content. Apache handlers specify how certain types of files are processed by the web server. For example, by default Apache is configured to process files that have .pl extensions as Perl files. If you also wanted to process files that have .script extensions as Perl files, you could set up a custom Apache handler for your site.
People are sometimes confused about the difference between MIME types and Apache handlers. MIME types instruct the browser how to process files, whereas Apache handlers instruct the server how to process files.
Adding custom Apache handlers can easily alter how your web site functions and cause unintended effects. If you need further assistance, please open a support ticket with our Guru Crew on the Customer Portal at https://my.a2hosting.com
Adding a custom Apache handler
To add a custom Apache handler, follow these steps:
- In the Advanced section of the cPanel home screen, click Apache Handlers.
- Under Create an Apache Handler, type the name of the handler in the Handler text box.
To see a list of handlers available, you can view the System Apache Handlers at the bottom of the page.
- In the Extension(s) text box, type the file extension or extensions that you want to be processed by the handler.
You must add a period ('.') before the extension name.
Deleting a custom Apache handler
You can delete custom Apache handlers at any time. However, you cannot delete system-wide Apache handlers. Please contact our A2 Hosting Guru Crew if you are experiencing issues with a system-wide Apache handler.
To delete a custom Apache handler, follow these steps:
- In the Advanced section of the cPanel home screen, click Apache Handlers. The list of custom Apache handlers is displayed under the User Defined Apache Handlers heading.
- Under Remove, click the red X icon for the custom handler that you want to delete.
to confirm the deletion.
- MIME Types
You can use cPanel to configure custom MIME types for your web site.
- Index Manager
You can use the Index Manager in cPanel to control how your web site handles directory listings.
- Error Pages
You can create custom error pages for your web site to define what a user sees when an error occurs.