Hello,
First, very sorry for my english.
I have domain(first server) www.ifotos.pl and domain(second server) s2.ifotos.pl
in server s2.ifotos.pl i have file x.jpg ( www.s2.ifotos.pl/x.jpg ), and i trying run this php script on first server:
[code]
<?
header('Content-Type: image/jpeg');
header('X-Accel-Redirect: /s2/x.jpg');
?>
[/code]
The solution I took from this site:
http://kovyrin.net/2010/07/24/nginx-fu-x-accel-redirect-remote/
And i'm reedit:
[code]
location ~* ^/internal_redirect/(.*?)/(.*) {
internal;
# Extract download url from the request
set $download_uri $2;
set $download_host $1;
# Compose download url
set $download_url http://$download_host/$download_uri;
# Set download request headers
proxy_set_header Host $download_host;
proxy_set_header Authorization '';
proxy_max_temp_file_size 0;
proxy_pass $download_url;
}
[/code]
[code]
<?
header('Content-Type: image/jpeg');
header('X-Accel-Redirect: /internal_redirect/s2.ifotos.pl/x.jpg');
?>
[/code]
And this method not working. What am I doing wrong?
Thank you in advance for your help.