Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

closed as too localized by Bryan, Ward, Magellan, mdpc, Tom O'Connor Jun 8 '13 at 16:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I got this working by regenerating the PDF; perhaps it was corrupted in some way. –  Seth Nov 29 '11 at 22:48

1 Answer 1

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;
...
}
share|improve this answer
    
I had already done that. Thanks, though. –  Seth Nov 29 '11 at 22:47

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