Support How To

HOW TO ADD A NEW MIME TYPE USING LINUX APACHE SERVER
When using Linux Apache for your web site, some configurations require you to add a new MIME type to allow the server to deliver Hyprecosm applet (.hcvm) files. This article describes how to add a new MIME type using Apache.

There are at least two different ways to configure MIME types using Apache. If you have access to the files that control the server's configuration, then you can add the new MIME type to the server's configuration file. If you do not have this permission, then you can configure a specific directory to recognise a new MIME type.

Adding a Mime Type to the Server Configuration File
Step 1: Go to the Configuration Directory
For Apache, there is a configuration directory which contains several files that are instrumental in determining how your server runs. In a standard Apache installation, these files are stored in a directory called "conf/". On most servers, this directory is located in "/user/local/etc/httpd/conf". To go to this directory type:

cd /user/local/etc/httpd/conf

Step 2: Edit the Mime Types File
Inside the configuration directory, there should be a file called "mime.types". This file contains a list of all of the MIME types that are currently defined on the server. To change this file, load it into your favorite text editor (for example, "vi").

Step 3: Add a new line for the new MIME type
Add a line to the configuration file that reads:

application/hypercosm .hcvm

After adding this line, save the file.

Step 4: Restart the Web Server
The file has been updated, so now you have to restart your server to make the changes take effect. You can restart the web server by killing the process named "httpd". You normally have to be logged in as "root" to restart the server.

Adding a new Mime type to a web site directory
Step 1: Go to the Web Site Directory
Go to the directory on your web server where your web site is located.

Step 2: Create a new ".htaccess" file
Create a new text file called ".htaccess". This file defines how files inside of this directory are to be handled by the server.

Step 3: Add a MIME type to the ".htaccess" file
Open up the ".htaccess" file using your favorite text editor and add the following line:

AddType application/hypercosm hcvm

Next, save the file and you're done.

Copyright ©2010 Hypercosm LLC