I have a domain like images.example.com
served from Apache server. The requests that go there currently are images that are drawn using server-side language (PHP) and are cached on the application side but it seems like huge overhead to me.
Is there an easy way (Apache module) to cache every request that goes to images
subdomain so that it doesn't reach the PHP at all, if it's still in the cache?
Apache does include the mod_cache module, which implements RFC2616 compliant caching. You'll need to ensure that your PHP script sets appropriate
Expires
headers in its responses. Your config should look something like this: