Skip to content Skip to sidebar Skip to footer

How To Change Mime Types In Mamp

I'm developing a website that has a HTML5 video. It looks like when ogg files are served with other mime types than video/ogg firefox flips. I've updated the mime.types file inside

Solution 1:

The mime.types file is in Applications/MAMP/conf/apache

There you can alter your mime types. Reset server after changing the file for it to take effect.

Solution 2:

Do you have mod_mime_magic installed and enabled? Is your mime magic working correctly? When you do file -m on one of your OGG files, does it say it is a plain text file? Are the file extensions correct?

Solution 3:

Adding mime-type is the same for all, it's just you need to understand how the types will be applied and what's the mime-type point is. In this answer I'll how I tried to add WebAssembly mime-type application/wasm in MAMP.

Here it goes:

I recently tried WebAssembly in MAMP and configured out the below mime-type that works for me.

First, we need to navigate the folder of MAMP in MacOS's Applications/MAMP/conf/apache, And then open the file mime.types in any editor.

After opening the file, add the following line anywhere in the mime.types file:

application/wasm wasm

Here is the example wasm mime type in my mime.types file:

#application/wasm
application/wasm wasm

Solution 4:

In MAMP Pro these days you can add <VirtualHost> parameters using the gui. Here's a screenshot showing how I add MIME types for .mjs and .wasm as:

AddType application/javascript      .mjs
AddType application/wasm      wasm

screenshot

Don't forget to restart the server after adding.

Post a Comment for "How To Change Mime Types In Mamp"