Blue Reef Technical Support Blue Reef Virtual Server Reseller ProgramInstallation instructions, manuals, how-tos, and more!About Blue Reef Consulting, Inc.

About Blue Reef Virtual ServersEcommerce Solutions for your Virtual ServerSearch the Blue Reef Virtual Server web site
Return to Blue Reef Virtual Servers Home Page
Order virtual servers, software, computers, and more!
Return to Blue Reef Main Home Page
Site Map
Support Solutions to help you do business with your Virtual Server.

Blue Reef Vitual Servers
Support Menu
Support White Papers
Server Configuration Overview
Configuring an index fileConfiguring an index file
Configuring CGI Settings
Installing CGi Scripts
CGI Security Issues
Server Side Includes
Restricing Access to Site
Choosing Passwords Wisely
Serving WAP DocumentsServing WAP Documents
Multi-language settings
Mime types
Configuring the Server Time Zone
Advanced Configuration
Recommended Books
Virtual Server Handbook
Submit a question to our Support Staff

Configuring MIME Types

The MIME Types configuration file determines how your Virtual Server's web server maps filename extensions to MIME types which are returned to the browser. Your browser then maps these MIME types to "helper" applications or in-line plug-ins. The "mime.types" configuration file is located in your ~/www/conf directory and can be modified to support any additional MIME type that you desire. Information about your MIME types configuration file is discussed in the following sections:

Default MIME Types
The default MIME type configuration file includes a definition of the most common known MIME types. The default MIME types file is located in your ~/www/conf directory which is the same location as your httpd.conf configuration file. If you need to add a MIME type that is not already listed in the default MIME types file, then you can easily add a new type by following the instructions provided below.

Adding a New MIME Type
There are two ways in which you can add a new MIME type to your default MIME types configuration file. You can either connect to your Virtual Server using Telnet or SSH and edit the file directly on your Virtual Server (using "pico", "vi", or you favorite UNIX text editor) or you can download the file to your local machine using an FTP client, edit the file, and then upload the modified MIME types file back to your Virtual Server. Either method is completely legitimate.

Before you edit your mime.types file (or upload a new copy), you may want to make a backup copy of the configuration file. You can do this easily by connecting to your Virtual Server using Telnet or SSH, run the following command:
    % cp mime.types mime.types.bak
Making backups of files before you modify them is always a good idea.

The format of the MIME types configuration file is pretty simple. Lines beginning with a "#" are comment lines; they are ignored by the web server. Each MIME type line consists of:
    type/subtype    ext1 ext2 ... extN
where "type/subtype" is the MIME type of the document whose filename ends with one of the extensions listed. The extension list can include any number of space separated filename extensions. Examples of MIME type entries can be found in the default MIME types file included with your Virtual Server setup.

If you decide to download your mime.types file using an FTP client, you should note that your MIME types file is an ASCII file and as such should be transferred (both downloaded and uploaded) in ASCII format not BINARY. Uploading your MIME types file in BINARY format may cause your web server to not function normally and in some cases, cease to function. Therefore, care should be taken in this regard. Most popular FTP clients allow you to select the file transfer mode.

You will need to restart your web server after editing your mime.types file.
    % restart_apache
More information
You can also check out our recommended books on Web Server Configuration.

Administration Utilities


Web Server Configuration

Advanced Server Configuration


Administering Web Servers, Security and Maintenance
Administering Web Servers, Security and Maintenance


Apache Server Bible


Apache : The Definitive Guide (2nd Edition, 1999)


Learning the VI Editor

$19.96 logo
Search for :
Enter keywords...