Hello I just installed Mongrel behind Apache, following the best deployment instructions on Mongrel''s site: http://mongrel.rubyforge.org/docs/apache.html. 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 following: application/pdf pdf among many other mime types. So everything looks ok, any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Charles Brian Quinn
2006-Sep-19 06:00 UTC
Re: Mongrel Behind Apache - mime-type not working
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: http://rubyforge.org/pipermail/mongrel-users/ cheers On 9/19/06, Jashugan <jashugan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello I just installed Mongrel behind Apache, following the best > deployment instructions on Mongrel''s site: > http://mongrel.rubyforge.org/docs/apache.html. 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 > following: > > application/pdf pdf > > among many other mime types. > > So everything looks ok, any ideas? > > > > >-- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---