rewrite rule failing with unicode urls on nginx with pcre 8.3

yoavaner nginx-forum at nginx.us
Wed Mar 21 21:39:52 UTC 2012


Valentin V. Bartenev Wrote:
-------------------------------------------------------
> On Wednesday 21 March 2012 14:56:49 yoavaner
> wrote:
> [...]
> > > > Is my nginx rewrite rule wrong? Is there a
> way to make this work?
> > > 
> > > Avoid using rewrites.
> > 
> > Or avoid using nginx, but that won't be an ideal
> solution obviously.
> > Hope that this gets fixed some time...
> > 
> 
> Try this:
> 
>   location ~ (*UTF8)^/imgthumb/(.*)$ {
>       fastcgi_pass ... or whatever you use
>       fastcgi_param QUERY_STRING  $1;
>       ...
>   }
> 
>  wbr, Valentin V. Bartenev
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx


Thanks Valentin. Your suggestion sounds promising. However, I'm sorry,
but I'm not that familiar with the nginx configuration rules. How do I
point it in the location directive to my php script (which is
timthumb.php) ?

I tried something like this, but it doesn't seem to work... I'm getting
an empty response unfortunately.


        location ~ (*UTF8)^/imgthumb/(.*)$ {
                fastcgi_pass    unix:/var/spool/phpfpm.sock;
                fastcgi_param   SCRIPT_FILENAME   
$document_root/timthumb.php;
                fastcgi_param   SCRIPT_NAME        /timthumb-orig.php;
                fastcgi_param   QUERY_STRING $1;
        }

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,224105,224201#msg-224201



More information about the nginx mailing list