Problem was in the Rewrite Base... It was / under apache, but nginx included /cache/thumbnail/ path, until I modified the rewrite code ( / before the thumbnail2.php). Also, permanent at the end helped. if (!-f $request_filename) { rewrite ^/cache/thumbnail/([^<]+)/([^<]+)$ /thumbnail2.php?file=$2&size=$1&reverse=1 permanent; break; }by vukpm - Migration from Other Servers
Hi all! I've set up nginx to be the front end web server, mostly forwarding all requests to back end apache, and serving some static content on its own. There's however one more complex site that uses php scripting to serve all images, and also caching them in the process. Idea is to (after some php modifying) have nginx check whether the image exist (has already passed php script, and wasby vukpm - Migration from Other Servers