<div dir="ltr"><div><div><div><div>@itpp, i just used your method try_files and it worked flawlessly :). Following is the testing config :<br><br>server {<br>    listen       80;<br>    server_name  <a href="http://domain.com">domain.com</a>;<br>
        root /var/www/html/files;<br><br>location / {<br>        root   /var/www/html/files;<br>       try_files $uri @getfrom_origin;<br>    }<br>location @getfrom_origin {<br>proxy_pass <a href="http://127.0.0.1:8080">http://127.0.0.1:8080</a>;<br>
}<br>}<br><br></div>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. :-)<br><br></div>Would you suggest me to add some more configs for tweaking on nginx ?<br>
<br></div>Btw, proxy_pass should only be for mp4 and jpeg, cause the caching is only for video files.<br><br></div><div>Should i use rsync or lsync for mirroring the files between Origin and caching server ?<br></div><div>
<br></div>Suggestion will be highly appreciated.<br><br><div><div><div><div><br></div><div>Regards.<br>Shahzaib<br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 28, 2014 at 4:19 PM, shahzaib shahzaib <span dir="ltr"><<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Right. I'll proceed with my research and get back to you with better approach . :)<br></div>
</blockquote></div><br></div>