X-Accel-Redirect
Gabriel Ramuglia
gabe at vtunnel.com
Wed Sep 30 12:36:58 MSD 2009
x accel redirect also works with proxied url locations, in addition to
on disk. i don't know about in memory items.
On Wed, Sep 30, 2009 at 12:44 AM, pepejose <nginx-forum at nginx.us> wrote:
> hi! (sorry for my english)
>
> that header only be used with files that are on the hard disk, true ?
>
> because I have a script to resize the size of some images with php,
>
> in the script i use... getimagesize($image) , then, depending on the size:
>
> 1) $thumb=ImageCreateTrueColor($new_x,$new_y)
> $im=@imagecreatefromjpeg($image); imagecopyresampled($thumb,$im,0,0,0,0,$new_x,$new_y,$old_x,$old_y); header("Content-type: image/jpeg"); imagejpeg($thumb,'',70);
>
> or
>
> 2) header("Content-type: image/jpeg"); readfile($image);
>
>
> -- In the first case X-Accel-Redirect not working because the image is in memory?
> -- If I change the second case to:
>
> header("Content-type: image/jpeg"); header("X-Accel-Redirect: /$image"); readfile($image);
>
> how can I know if the header X-Accel-Redirect is working?
>
> thanks!!!!
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,10152,10152#msg-10152
>
>
>
More information about the nginx
mailing list