Hi all,
I have installed Nginx as a reverse proxy for my web server on a Debian "lenny: box. The back-end is Apache 2.2.
Normally, all the request come to Nginx will be forwarded to Apache. For some static files (jpg, bmp, js, css), Apache usually returns [b]304 status code[/b] to inform client's browser not getting those files because they are not changed.
I have just installed memcached and use memcache module of Nginx to cache static files (jpg, bmp, js, css) in the memory to free Apache from serving static content. I also run my own script to cache all static content in memcached because Nginx does not cache automatically.
Now, as I saw in my logs of the both Apache and Nginx, Apache only serves dynamic pages (php) and the remaining is served by Nginx. However, Nginx has not returned [b]304 status code[/b] any more. It always return [b]200 status code[/b], thereby, client's browser must be re-downloaded the static contents.
How can I configure my Nginx to detect the modified information which is sent from clients like the way Apache does? I do not want Nginx to re-send cached content to clients if clients have the latest version of that content.
Thank you very much!
Cuong