Welcome! Log In Create A New Profile

Advanced

Re: X-accel-redirect serving html download page instead of file.

August 27, 2012 11:02PM
I noticed that if I use this in my config then shipped/Dir 1/file.exe returns file not found in browser and shipped/dir/file.exe still returns proper file extension (exe, etc) but contains the html content of the download page.

location = /files {
root /home/mysite/public_html/shipped;
internal;
add_header Content-Disposition attachment;
}

header("X-Accel-Redirect: /files/" . $path);

While removing that and using "header("X-Accel-Redirect: /shipped/" . $path);" the actual file location works for shipped/Dir 1/file.exe but not for shipped/dir/file.exe.

I'm at a lose as to why it's not working properly.
Subject Author Posted

X-accel-redirect serving html download page instead of file.

wideawake August 27, 2012 09:29PM

Re: X-accel-redirect serving html download page instead of file.

Justin Dorfman August 27, 2012 09:58PM

Re: X-accel-redirect serving html download page instead of file.

wideawake August 27, 2012 10:05PM

Re: X-accel-redirect serving html download page instead of file.

Justin Dorfman August 27, 2012 10:32PM

Re: X-accel-redirect serving html download page instead of file.

wideawake August 27, 2012 11:02PM

Re: X-accel-redirect serving html download page instead of file.

Maxim Dounin September 03, 2012 02:32PM

Re: X-accel-redirect serving html download page instead of file.

poulphunter December 04, 2012 09:07AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 119
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready