I'm looking to reduce the load on my server.
I already have my php files setup so whenever someone first visits a particular page, it caches the html output to a whatever.htm file in my /cache folder.
I'm using nginx as a 'frontend' to my apache server (which only serves php files).
Is it possible to setup nginx so that :
1) If a request for index.php is requested, first check to see if index.htm exists in the /cache folder - if so, serve that page instead. If not, pass off the request to apache.
2) I would only like nginx to check the cache folder only for a particular set of filenames (not all php files) - can an array or something similar be setup that way? (only check cache for index.php, contact.php, faq.php, etc requests)
3) If serving a .htm "cache" file, it is possible to to make it look like it's still serving the .php file? I just don't want the extension to show .htm in the address bar and start having duplicate content issues with the search engines.
Any help would be appreciated!