Thank you, I guess I misunderstood those directives' functions.
After removing them, now I receive a 404 when attempting to access the image. The error log shows:
[error] 1109#0: *40 open() "/var/www/public_html/dev/public/var/www/public_html/dev/public/doku/data/media/image.jpg" failed (2: No such file or directory), client: 192.168.1.121, server: dev, request: "GET /doku/lib/exe/fetch.php?cache=&media=image.jpg HTTP/1.1", upstream: "fastcgi://unix:/usr/local/var/run/php-fpm.sock:", host: "dev", referrer: "http://dev/doku/lib/exe/detail.php?id=start&media=image.jpg
The webroot, /var/www/public_html/dev/public/ appears twice in the file's path. How can I prevent this?