I've tried numerous config files found for nginx and dokuwiki rewrites however my images remain corrupted on fetching.
Dokuwiki and the webserver can display images from the /webroot/lib/tpl/dokuwiki/images folder, so I see icons, the logo and such.
However, uploaded images are broken for me.
To explain this, I've downloaded this image
http://images.gofreedownload.net/linux-tux-100404.jpg and uploaded to my wiki.
1. Uploaded the image to the wiki OK.
https://s4.postimg.io/is03klnjx/doku1.png
2. Ran sha1sum on the client
https://s4.postimg.io/q9dwdk2gt/doku2.png
3. Ran sha1sum on the server, they're the same
https://s4.postimg.io/eyb8p6vlp/doku3.png
4. The error message I've been getting for all uploaded images
https://s4.postimg.io/num0t4m7x/doku4.png
5. Piping curl output to Imagemagick's display results in error
https://s4.postimg.io/lrbllgmf1/doku5.png
6. The output from curl results in a new file, with different sha1sum
https://s4.postimg.io/z9ihxqykd/doku6.png
7. I don't know anything about php, but I think the readable part in the image below refers to php5-gd module doing some compression on the image, hence the new sha1 hash
https://s4.postimg.io/b71o2vhx9/doku7.png
8. Nginx access log returns 200 of course
https://s4.postimg.io/a61fdr0xp/doku8.png
9. Nginx error log talks about saving that image to a temp file
https://s4.postimg.io/xyaqpa2yl/doku9.png
10. nginx config file:
https://paste.ee/r/lgAoU
11. php5-fpm config file
https://paste.ee/r/FTxqp
I've really got no idea how to proceed. I went and tried to apply the changes recommended for this error code from google's search results, but none of them worked.
I've also tried the nginx rewrites found on the internet, from nginx.com or other forums, but they're not fine.
Host: Raspbian 8
Webserver: nginx 1.6.2
php: PHP 5.6.24-0+deb8u1 (cli) (built: Jul 27 2016 00:06:04)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
php modules:
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mhash
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache