I am trying to get $r->sendfile() working under the perl module for nginx, it always fails.
Basically I have image::magick making a file and then I simply try to send that file with $r->sendfile
The file is definitely created, and can even be sent later, unmodifed, by try_files
I've tinkered with the ownership (chown) and chmod and even nobody:nobody with nginx running as nobody fails.
The only way I can get the file to transmit from perl is to use $r->print while reading the file into a buffer
Depending on the file settings I either get a file not found error (22) but it's definitely there, so it's permissions, or "Inappropriate ioctl for device".
Note that selinux is off (permissive mode).
And remember, it works with try_files, so nginx can read it, just not with perl.
What on earth is sendfile doing, and how it is trying to access the file that every other way works?
I cannot think of anything else to try, thanks for any suggestions.
Oh this is under CentOS 6.4 with nginx 1.4.2
Edited 1 time(s). Last edit at 08/31/2013 12:58PM by _ck_.