ALL SYSTEMS OPERATIONALUPTIME 99.97%FLEET 18/18IN-MUM · US-LAX · EU-FSN EST. 2003 · +91 11 4998 4038

KNOWLEDGEBASE · LINUX

Apache handlers explained

Last updated 2019-02-03

Apache is an open-source HTTP server, and is used to serve your website. Apache handlers control how your site’s Apache web server software manages certain file types and file extensions. Apache can handle CGI scripts and server-parsed files. The file extensions for these files include .cgi, .pl, .plx, .ppl, .perl, and .shtml. Apache handlers tell the server how to process the file that requested. 

People often get confused as to the difference between MIME types and Apache handlers.   Basically, MIME types tell your browser how to handle / render file requested from server, while Apache handlers tell the server how to process and service the file requested by visitor.

For example: Apache is setup to process files with .pl extensions using Perl and .php extensions using PHP. 

You can configure Apache to use an existing handler to handle a new file type. Let's say you want to process files with .script custom extension using Perl, then you would have to set up a custom Apache handler for your site in cPanel.

To add a custom Apache handler:

  1. Click on the cPanel >> Advanced >> Apache handlers button after login to cPanel.

  2. Enter the custom file extension in the Extension(s) field. You need to add the . before the extension name.

  3. Enter the Apache handler in the Handler field. Have a look at the list of system-wide Apache handlers to show you how to add a new one or add to a pre-existing one.

  4. Click on the Add button

Now your custom file extension will be serviced by the handler setup by you above.

Warning: Adding an Apache handler, can easily alter the correct functioning of your web site. Do not use this feature unless you know what you are doing.

← All knowledgebase articles

Tell us what has to stay up.

A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.