24/7/365 Support(866) 96-GATOR
  1. Knowledge Base
  2. >
  3. Advanced Troubleshooting
  4. >
  5. Apache Handlers

Apache Handlers

Apache Handlers allow you to control how Apache will manage certain file types. When Apache recognizes a file, it has an action built in for that file type and will perform that action. If you want Apache to perform a different action, you will need to make a handler to tell Apache to perform that action.

For example, if you use a file type that requires a special service in order to run, such as a file with server-side includes that is not named with a .shtml extension, you need to tell Apache to treat these files differently.


Running HTML as PHP

It is highly recommended that you never allow HTML pages to automatically handle PHP or SHTML because this forces all of your HTML pages to be processed by the server first. Instead, please rename your files to .php or .shtml whenever possible.

The following article will provide detailed information on how to use handlers to execute PHP in your .html files:


Additional PHP Configuration

You can also manage your PHP Version using our PHP Configuration Plugin! For additional information regarding this plugin, please refer to the following article:


System MIME Type Defaults

Handler CodeFile Extensions
application/x-hdfhdf
application/vnd.wap.wbxmlwbxml
image/x-xbitmapxbm
image/x-iconico
image/vnd.djvudjvu djv
application/x-troff-meme
application/perlpl plx ppl perl pm
application/x-tcltcl
image/bmpbmp
text/x-sqlsql
image/pngpng
text/x-loglog
audio/x-realaudiora
application/x-latexlatex
application/x-directordcr dir dxr
text/rtfrtf
application/xhtml+xmlxhtml xht
application/vnd.ms-powerpointppt
application/x-cshcsh
image/svg+xmlsvg
application/x-troff-msms
image/x-rgbrgb
application/x-imgimg
image/jpegjpeg jpg jpe
image/x-portable-pixmapppm
text/plainasc txt
image/cgmcgm
application/x-shsh
application/andrew-insetez
application/vnd.wap.wmlscriptcwmlsc
text/x-registryreg
video/vnd.mpegurlmxu
image/iefief
audio/x-pn-realaudioram rm
image/x-xpixmapxpm
video/mpegmpeg mpg mpe
text/tab-separated-valuestsv
application/rdf+xmlrdf
application/x-httpd-phpphtml php php3 php4 php5 php6
x-conference/x-cooltalkice
image/tifftiff tif
text/richtextrtx
text/csscss
application/rubyrb
application/x-wais-sourcesrc
application/xmlxml xsl
application/voicexml+xmlvxml
image/x-portable-graymappgm
chemical/x-xyzxyz
model/igesigs iges
application/vnd.mifmif
application/mathml+xmlmathml
application/x-ustarustar
application/x-troff-manman
text/vbscriptvbs
text/calendarics ifb
chemical/x-pdbpdb
application/smilsmi smil
application/srgs+xmlgrxml
image/x-portable-anymappnm
application/x-shockwave-flashswf
audio/mpegmpga mp2 mp3
video/x-sgi-moviemovie
application/cgicgi
application/x-cpiocpio
application/x-javascriptjs
text/x-setextetx
audio/basicau snd
text/sgmlsgml sgm
application/x-tartgz tar
application/vnd.mozilla.xul+xmlxul
application/x-futuresplashspl
application/xslt+xmlxslt
model/meshmsh mesh silo
application/mac-binhex40hqx
text/vnd.wap.wmlwml
image/x-cmu-rasterras
application/x-sv4cpiosv4cpio
audio/x-aiffaif aiff aifc
application/x-gtargtar
audio/x-ms-waxwax
audio/x-ms-wmawma
image/x-xwindowdumpxwd
application/x-cdlinkvcd
application/msworddoc
video/quicktimeqt mov
application/x-bcpiobcpio
application/x-textex
text/x-configcnf conf
application/x-sv4crcsv4crc
application/x-dvidvi
application/x-trofft tr roff
audio/x-mpegurlm3u
application/x-sharshar
audio/mp4a-latm m4p m4a mp4
application/pdfpdf
application/mac-compactprocpt
application/vnd.wap.wmlcwmlc
video/x-msvideoavi
application/oggogg
text/htmlhtml htm shtml
image/gifgif
audio/midimid midi kar
application/x-pkcs7-crlcrl
application/x-chess-pgnpgn
audio/x-pn-realaudio-pluginrpm
application/srgsgram
application/x-koanskp skd skt skm
image/vnd.wap.wbmpwbmp
application/x-netcdfnc cdf
model/vrmlwrl vrml
application/x-httpd-php-sourcephps
application/vnd.ms-excelxls
application/postscriptai eps ps
application/x-texinfotexinfo texi
application/zipzip
image/x-portable-bitmappbm
audio/x-wavwav
application/x-x509-ca-certcrt
application/odaoda
application/xml-dtddtd
application/octet-streambin dms lha lzh exe class so dll iso dmg
text/vnd.wap.wmlscriptwmls
application/x-stuffitsit

For more information on how to use Apache Handlers in cPanel, please refer to cPanel's official documentation.