How to create an nginx rewrite to timthumb.php
I have a website that has many custom image sizes. I'm following this
example which uses apache but I need to recreate this on an Nginx server.
http://wp.tutsplus.com/tutorials/using-timthumb-with-custom-urls-for-site-optimization/
The first part of my server
server {
server_name site.com *.site.com;
access_log /var/log/nginx/www.site.com-access.log;
error_log /var/log/nginx/www.site.com-error.log;
location /media/resizer/ {
#root /var/local/www/site.com/media/resizer;
rewrite ^/media/resizer/(.*)x(.*)/r/(.*)/c/(.*)$
/media/resizer/thumb.php?src=http://$3&h=$2&w=$1&zc=$4&cc=000000
last; break;
}
}
I'm currently receiving a 500 error when I provide a URL that matches that
pattern. The script works when I access it normally without the rewrite.
Thanks in advance for any insights
No comments:
Post a Comment