Apache handlers and MIME types in cPanel

MIME types

A MIME type tells the browser what kind of file it received: display it, download it or run it. If the browser downloads a file instead of opening it (or the other way round), add the type.

  1. Open "MIME Types" (group "Advanced").
  2. Enter the type in "MIME Type", for example application/manifest+json, and the extension webmanifest.
  3. Click "Add".
New MIME type
New MIME type

Apache handlers

A handler defines how the server processes files with an extension. For example, to run files as CGI scripts (.cgi and .pl are already set up system-wide; you need your own handler only for other extensions):

  1. Open "Apache Handlers".
  2. "Handler" - cgi-script, "Extension(s)" - the extension you need.
  3. Click "Add".
New Apache handler
New Apache handler

The panel writes the setting to .htaccess in the site folder: AddHandler cgi-script .pl, AddType application/manifest+json .webmanifest.

Do not map PHP to .html or other extensions: it breaks the site and opens security holes. The PHP version is set in Select PHP Version.

Questions and answers
Add the correct MIME type for the extension in "MIME Types".