BuycPanel Blog

BuycPanel Blog

Latest news and updates

3/30/2015 – Add an Apache Handler in cPanel

Posted by Jamison on 30 03 2015.

Apache is a tool that helps your server read different files that are attempting to enter or you want to include in your site. It is an open-source HTTP server and is used to process files via Perl. Now, if you have files that runs on .script extension, and you want to process it using Perl as well, then you may need an Apache handler. This tool can help you customize and assist your server on how to read and handle different file types and extensions.


Note: Most cPanel and Apache users are confused with the functions of MIME types and Apache handlers. Some would often think that the two utilities are just the same and can be interchanged; however, altering both functions can misconstrue script reading. Basically, Apache handlers assist the server how to read and handle files and extensions; while MIME types assist the browser with the same task. In other words, an Apache handler is for server; while a MIME type is for browser. If you are unsure of which utility to use, ask your hosting administrator for assistance in case of adding either MIME type or Apache handler.


How to setup an Apache handler


To add this tool, simply follow these easy steps.


    1. Go to your cPanel’s home page and click on the Apache handlers.


    2. In the Handler field, enter the handler name. The text box provide a list of Apache handlers you want to use. You can a new one or just use a pre-existing one. Type or select an Apache handler. CPanel supports different handlers such as follows:


      a. default-handler. This one uses Apache’s default handler and sends the file or extension.

      b. cgi-script. This handles files or extensions as a CGI script.

      c. send-as-is. This sends files or extension that have HTTP headers intact.

      d. server-info. This one retrieves the information in your site’s configuration.

      e. server-parsed. This handler parses files or extensions for server-side includes.

      f. server-status. This one retrieves the status report of your site.

      g. imap-file. This parses files as an imagemap file.

      h. type-map. This parses files as a type map file.


    3. In the Extension(S) field, enter the file extension in the text box. Make sure that to place a dot (.) before the file extension. For example .filename.fileextension. In this area, you can enter more extensions at a time. Just put a space after each entry to separate each file.


    4. Lastly, click the add button beside the Handler text box. And that’s it.


How to delete a handler


Although you can delete a certain custom Apache handler, you cannot delete the system-wide Apache handlers as it can cause unwanted conflicts in your server. Ask your hosting administrator for assistance if you encounter problems regarding your Apache handlers. If you want to delete an Apache handler, try following these easy steps:


    1. Once you are inside the Apache handlers page, look for the Delete button under the Handlers field. Enter the file extension and the handler and then click delete.


    2. Or you can also go to the User-Defined Apache Handlers list, and click the X button under the Remove heading. Select the Yes button to confirm the task.