Getting apache to play nice
March 4th, 2008 Posted in LinuxBy default in CentOS and RHEL, apache does a very good job of handing out what you tell it. However if you deviate much from the usual html and php filetypes, you may find that some browsers try to render your files as text. Sometimes this is the desired behavior, and sometimes it’s not. I’ve been compiling a list of various extensions added to apache via the AddType directive for some time now, and enough folks have asked for it that it’s probably time to share it out. For those of you who are interested, here’s the filetype.conf I use. If something is missing, there are corrections to be made, or you’ve got questions, please ask in the comments.
Download it here