# Mongrel and mimetype?

**URL:** <https://www.ruby-forum.com/t/mongrel-and-mimetype/174177>\
**Category:** Rails\
**Created:** [August 21, 2009, 8:30pm UTC](https://www.ruby-forum.com/t/mongrel-and-mimetype/174177 "2009-08-21T20:30:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bornboulder](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@bornboulder](https://www.ruby-forum.com/u/bornboulder)\
**Post date:** [August 21, 2009, 8:30pm UTC](https://www.ruby-forum.com/t/mongrel-and-mimetype/174177/1 "2009-08-21T20:30:06Z")

</div>

Dear Mongrel People,

lighttpd allows me to assign a mimetype to a file which ends with a  
specific suffix.

For example if I have a file named, “helloworld.manifest”, and I serve  
it using lighttpd,  
I can declare its mimetype with the following declaration in  
lighttpd.conf:

mimetype.assign = (  
“.manifest” =\> “text/cache-manifest”,  
“.css” =\> “text/css”,  
“.gif” =\> “image/gif”,  
“.htm” =\> “text/html”,  
“.html” =\> “text/html”,  
“.jpeg” =\> “image/jpeg”,  
“.jpg” =\> “image/jpeg”,  
“.js” =\> “text/javascript”,  
“.png” =\> “image/png”,  
“.swf” =\> “application/x-shockwave-flash”,  
“.txt” =\> “text/plain”  
)

With Mongrel, how do I declare the mimetype of “helloworld.manifest” ?

-b

---

<div class="post-metadata">

**Author:** ![bornboulder](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@bornboulder](https://www.ruby-forum.com/u/bornboulder)\
**Post date:** [August 21, 2009, 8:41pm UTC](https://www.ruby-forum.com/t/mongrel-and-mimetype/174177/2 "2009-08-21T20:41:49Z")

</div>

Hi b,

On Fri, 2009-08-21 at 11:02 -0700, removed\_email\_address@domain.invalid wrote:

> Dear Mongrel People,

This is a Rails list, not Mongrel. While I don’t consider myself a  
Mongrel expert I think I can help you with your question.

> lighttpd allows me to assign a mimetype to a file which ends with a  
> specific suffix.

\> \> With Mongrel, how do I declare the mimetype of "helloworld.manifest" ?

AFAIK, you don’t. The reason is that Mongrel is used, at least in ‘our’  
world, to serve dynamic content to front-facing web servers like Apache,  
Lighttpd, nginix, … In fact, if you type 'lighttpd vs ’ in the google  
search box in Firefox you get a list of web servers that are reasonable  
comparisons. Mongrel’s not in the list.

HTH,  
Bill

---

<div class="post-metadata">

**Author:** ![bornboulder](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@bornboulder](https://www.ruby-forum.com/u/bornboulder)\
**Post date:** [August 21, 2009, 11:54pm UTC](https://www.ruby-forum.com/t/mongrel-and-mimetype/174177/3 "2009-08-21T23:54:59Z")

</div>

Easy answer:

Read this:  
[http://mongrel.rubyforge.org/wiki/HOWTO](http://mongrel.rubyforge.org/wiki/HOWTO)

## Write that:

.manifest: text/cache-manifest  
.css: text/css  
.gif: image/gif  
.htm: text/html  
.html: text/html  
.jpeg: image/jpeg  
.jpg: image/jpeg  
.js: text/javascript  
.png: image/png  
.swf: application/x-shockwave-flash  
.txt: text/plain

Run this:  
cd rails\_root  
mongrel\_rails start -m config/mime.yaml

-b

On Aug 21, 11:02 am, “removed\_email\_address@domain.invalid”
