Just like you configure a proxy to your backend server, you can have a separate directory for uploaded files served through a proxy. There should be no need to sync files between the two servers.<br><br>For example:<br>location /uploads/ {<br>
    proxy_pass <a href="http://10.1.1.2/uploads/">http://10.1.1.2/uploads/</a> # or whatever<br>}<br><br><div class="gmail_quote">On Sun, Apr 11, 2010 at 5:58 PM, Leonardo Crespo <span dir="ltr">&lt;<a href="mailto:leo@leocrespo.com" target="_blank">leo@leocrespo.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi guys.<br>
<br>
Newbie question here, apologies in advance.<br>
<br>
By using a static content server (nginx as reverse proxy), how does<br>
one deal with user uploads? I mean, I can understand if I client<br>
request our website’s /images/logo.png file, because we manually store<br>
it on the static content server, but what about the photo that our<br>
user just uploaded to his photo album?<br>
<br>
My confusion is: if a request is to a .php file, I’ll pass through the<br>
back-end server. So If a user wants to upload a file, it’ll be upload<br>
to /user-uploads/file.jpg *on the back-end server*. How can we make<br>
the static server serve the image? I’m imagining there has to be some<br>
sort of synchronization, but then again there the problem that the<br>
image might take longer to be replicated to the static content server<br>
and when the user request’s it, he’ll get a 404… not acceptable for<br>
online businesses.<br>
<br>
Can anyone with more experience tell me what am I missing?<br>
<br>
Cheers<br>
<font color="#888888"><br>
Leonardo<br>
</font><div><div></div><div><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br>