Jump to content

Apache2 and Content Type


Scott85

Recommended Posts

Hi.  I'm having a problem that an Apache2 server is sending a content type of text/plain for a PDF document instead of application/pdf.  Here is the setup - there are a number of Ruby on Rails applications running mongrel processes behind the Apache2 server.  The PDF documents are in the Public folders of the RoR apps.  When I try to access the PDFs from IE7 or Safari, they work fine.  When I try to access from Firefox 2 or 3, they show up as plain text.  Checking with curl -I confirms that the server is sending "text/plain" as the content type.  There is already an "application/pdf pdf" entry in the conf/mime.types, and adding "AddType application/pdf .pdf" to conf/httpd.conf doesn't help.  Also, there is an approval server running the same RoR apps in the same setup, and it serves the PDFs correctly (with an "application/pdf" content type).  So, what do I need to change to make the server send application/pdf content type for PDFs?  My experience with Apache is limited, and I didn't set these servers up, but if you need any more information I should be able to find out.  Thanks for any help.

Link to comment
https://forums.phpfreaks.com/topic/124853-apache2-and-content-type/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.