location question
Tomasz Pajor
nikon at puffy.pl
Thu Sep 3 14:33:43 MSD 2009
This worked great, but i had to change the request format to:
http://test.dev/imgheaders/<img_hash>.png?<img_serialize>
and the image if exists is in /vhosts/static/img/headers/<img_hash>.png
Can You please update the location statement, because I can't get it right, thanks!
--
Best regards
Tomasz Pajor
> On Thu, Sep 03, 2009 at 11:14:17AM +0200, Tomasz Pajor wrote:
>
>
>> I have a request:
>>
>> http://test.dev/imgheaders/<img_hash>/<img_serialize>
>>
>> What I want to achieve is, get from location <img_hash>, and check if
>> file exists, if it exists then serve the file. if file not exists pass
>> <img_serialize> to php fastcgi script and it will return the image.
>>
>> Any suggestions on how to achieve this?
>>
>
> location ~ ^(/imgheaders/[^/]+)/[^/]$ {
> root ...
> try_files $1 @php;
> }
>
> location @php {
> ...
> }
>
>
>
More information about the nginx
mailing list