@itpp, i just used your method try_files and it worked flawlessly :).
Following is the testing config :

server {
    listen       80;
    server_name  domain.com;
        root /var/www/html/files;

location / {
        root   /var/www/html/files;
       try_files $uri @getfrom_origin;
    }
location @getfrom_origin {
proxy_pass http://127.0.0.1:8080;
}
}

if proxy_pass worked for localhost, i hope it will also work for remote
host to forward request if the file doesn't exist on local caching server.
:-)

Would you suggest me to add some more configs for tweaking on nginx ?

Btw, proxy_pass should only be for mp4 and jpeg, cause the caching is only
for video files.

Should i use rsync or lsync for mirroring the files between Origin and
caching server ?

Suggestion will be highly appreciated.


Regards.
Shahzaib


On Wed, May 28, 2014 at 4:19 PM, shahzaib shahzaib <[email protected]>
wrote:

> Right. I'll proceed with my research and get back to you with better
> approach . :)
>
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to