location /data/uploads/filebase {
rewrite ^(.*)$ /site/test/?file=$1 last;
return 403;
}
location /download {
internal;
alias /var/www/www-root/data/www/SITENAME/www/data/uploads/filebase;
}
header('X-Accel-Redirect: /download/test.txt');