Welcome! Log In Create A New Profile


Cache by content type?

Posted by h1d 
Cache by content type?
July 03, 2010 11:59PM
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?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 81
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready