MIME types form a standard way of classifying file types on the Internet. Internet programs such as Web server and Web browsers all have a list of MIME types, so that they can transfer files of the same type in the same way, no matter what operating system they are working in.

Adding New MIME Types

The default MIME type configuration file for your Virtual Private Server Apache Web Server is located at ~/www/conf/mime.types. This file includes definitions for the most common MIME types. MIME types can also be defined in your Web server configuration file. It is recommended that new MIME types be added in that file using the AddType directive rather than changing the ~/www/conf/mime.types file.

The AddType directive maps the given filename extensions onto the specified content type.

AddType MIME-TYPE FILE-EXTENSION [FILE-EXTENSION] ...

MIME-TYPE is the MIME type to use for filenames containing FILE-EXTENSION. This mapping is added to any already in force, overriding any mappings that already exist for the same extension.

A MIME type has two parts: a type and a subtype. They are separated by a slash (/). For example, a MIME type for Macromedia Flash files is application and the subtype is x-shockwave-flash. Together, the complete MIME type is application/x-shockwave-flash. Here is the complete AddType directive to add the MIME type for Macromedia Flash:

AddType application/x-shockwave-flash .swf .cab

There are three ways in which you can add the AddType directive to the web server configuration file. You can either connect to your Virtual Private Server using Telnet or SSH and edit the file directly on your Virtual Private Server (using pico, vi, or you favorite UNIX text editor). Or you can Download the file to your local machine, edit the file, and then upload the modified file back to your Virtual Private Server. Another way is to edit the file using iManager's File Manager.

NOTE: If you transfer the web server configuration file via FTP, be sure to use ASCII mode.

Examples

Many Virtual Private Server features require MIME type definitions. These are a few of them:

Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!

1555 N Naperville/Wheaton Road, Suite 107
Naperville, IL 60563
phone 630.420.2550
fax 630.420.2771