Mongrel Behind Apache - mime-type not working

Hello I just installed Mongrel behind Apache, following the best
deployment instructions on Mongrel’s site: I have one Mongrel
process behind Apache, so I used the simple Apache configuration listed
near the top.

My website is running, but when I try to retrieve PDF pages, I get them
as jarbled text in the browser. I believe this is due to the mime-type
not being sent to the browser correctly. I checked the apache conf
file, and it references a file: etc/mime.types file which lists the

application/pdf pdf

among many other mime types.

So everything looks ok, any ideas?

I need to rewrite (and/or put a disclaimer) on that page – since you
are simply forwarding on all requests to mongrel, it is mongrel who
needs to know about the mime-type, however, I wouldn’t do this, as
apache is a lot better at serving up static files – it’s made to
handle rails (and ruby applications).

The easiest way if your pdf files are in public would be to grab
pieces of the configuration described on that page you reference below
– specifically the directory segment for public.

You could get fancy and add a rewrite rule for just pdfs, or add the
directory where they are served to make sure apache serves them up
(view your mongrel.log flle for details).

However, if you want to just balk and let mongrel serve them up,
search the mongrel list for a previous posting (pretty recent) on
someone who did end up adding mimetypes to mongrel and letting it
serve them up:


On 9/19/06, Jashugan [email protected] wrote:

file, and it references a file: etc/mime.types file which lists the

Charles Brian Q.
highgroove studios:
slingshot hosting: