Fixing “Cannot get media type from ‘0’”

By the way, if you ever see lots and lots of lines in your Apache logs like this:

[warn] Cannot get media type from ‘0’
[warn] Cannot get media type from ‘0’
[warn] Cannot get media type from ‘0’
[warn] Cannot get media type from ‘0’
[warn] Cannot get media type from ‘0’
[warn] Cannot get media type from ‘0’

(specifically if you’ve upgrade from Apache 1.x to Apache 2.x) you need to add the following to your httpd.conf:

TypesConfig /etc/mime.types
DefaultType text/plain

For some reason, our Apache 1.x files didn’t have that in there and it’s apparently required by Apache 2.x for correct mime type handling.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s