[Mongrel] Mongrel and mimetype?

Bjorn Boulder bornboulder77 at gmail.com
Fri Aug 21 15:35:20 EDT 2009


Easy answer:

Read this:
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 8/21/09, Bjorn Boulder <bornboulder77 at gmail.com> wrote:
> 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" ?
>
> -moi
>


More information about the Mongrel-users mailing list