Static files download

Igor Sysoev igor at sysoev.ru
Wed Jun 9 22:11:55 MSD 2010


On Wed, Jun 09, 2010 at 08:06:35PM +0200, Axel wrote:

> I tried to review all my configuration. I do not understand why PDF files are returned inline to the browser. Images, videos and flash files are properly sent, why not pdt and zip?
> has anyone the same issue?
> 
> @Igor: here the debug log http://pastebin.com/K4E6yvpD

/inc/BC_RV_2010.pdf is passed to fastcgi and it returns
"Content-Type: text/html; charset=utf8"

You should add .pdf to static location:

-   location ~* \.css|\.js|\.jpg|\.jpeg|\.png|\.gif|\.swf|\.svg|\.tiff$ {
+   location ~* \.css|\.js|\.jpg|\.jpeg|\.png|\.gif|\.swf|\.svg|\.tiff|\.pdf$ {


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list