diff --git a/inc/httputils.php b/inc/httputils.php
index fdf453a8cf7489ffa33f6cffbfd7f479d9a7313d..d6532720f48e386dd9e3666a5cabd7a16fcfd118 100644
--- a/inc/httputils.php
+++ b/inc/httputils.php
@@ -80,6 +80,8 @@ function http_sendfile($file) {
         ob_end_clean();
         exit;
     }elseif($conf['xsendfile'] == 3){
+        // FS#2388 nginx just needs the relative path.
+        $file = DOKU_REL.substr($file, strlen(fullpath(DOKU_INC)) + 1);
         header("X-Accel-Redirect: $file");
         ob_end_clean();
         exit;