question about X-LiteSpeed-Location

vang

New Member
#1
our developers are using X-LiteSpeed-Location in php code, something like
...
header("X-LiteSpeed-Location: {$path}");
...

to serve files outside webroot. on one webserver ($path being an absolute path on filesystem), this works perfectly fine. on another server, it doesn't works and when i enabled debug mode i saw in logs that the webserver is trying to get files not from the absolute path but it considers that path relative to webroot. for example, having $path=/mnt/something/file.pdf and webroot /var/www/website, is trying to redirect to /var/www/website/mnt/something/file.pdf.

The question:
is there any config option which affect X-LiteSpeed-Location behaviour? are there any differences in handling X-litespeed-Location between Litespeed Web Server Standard v3.3.22 and Litespeed Web Server Enterprise v3.3.24 ?

ps. i know i cand probably solve this with simbolic links, for the moment i try to understand from the difference comes.
 

auser

Super Moderator
#2
our developers are using X-LiteSpeed-Location in php code, something like
...
header("X-LiteSpeed-Location: {$path}");
...

to serve files outside webroot. on one webserver ($path being an absolute path on filesystem), this works perfectly fine.
absolute path should not work. instead, using URL

refer
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed:wiki:feature:internal_redirect

"Security Consideration

Unlike X-Sendfile or X-Accel-Redirect implementation in other web servers, LiteSpeed uses a URL instead of file path for security reasons. "
 
Top