I am starting with a default installation of nginx. The only modification I've made to my enabled-sites/default file is:

root /home/ubuntu/www

...where I have a web site and a /pdf folder that contains my pdf files.

If I click a link to a pdf file, it gets served as text/html and of course looks rather broken in the browser window.

If I add Jeremy's configuration section from http://www.jeremywalworth.com/index.php?q=taxonomy/term/49, then I get 404's for the same pdf file link.

link|improve this question
I got this working by regenerating the PDF; perhaps it was corrupted in some way. – S37H Nov 29 '11 at 22:48
feedback

1 Answer

check if the mime.types file has this entry

application/pdf                       pdf;

and if you include the mime.types file in the http section of your conf

http {
    include       /etc/nginx/mime.types;
...
}
link|improve this answer
I had already done that. Thanks, though. – S37H Nov 29 '11 at 22:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.