I've set up nginx to do reverse proxy against an apache and is working fine and currently I'm trying to cache static files such as png/jpg/gif/js/css onto nginx to serve them directly by using 'location' directive by checking the request address.
But in this case, I see that the limitation is when those static files are served via php such as by 'css.php', it's hard to filter them out and I was thinking if nginx is capable of caching the content by the content-type header returned by apache, which would be a lot more reliable method.
This becomes important when a site only executes index.php to route all the request around to return on behalf, which makes it impossible to check by address what type of content is being requested.
Is this possible to do?