Welcome! Log In Create A New Profile

Advanced

Re: location question

Tomasz Pajor
September 03, 2009 07:06AM
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 {
> ...
> }
>
>
>
Subject Author Posted

location question

Tomasz Pajor September 03, 2009 05:36AM

Re: location question

Igor Sysoev September 03, 2009 05:36AM

Re: location question

Igor Sysoev September 03, 2009 05:44AM

Re: location question

Tomasz Pajor September 03, 2009 07:06AM

Re: location question

Tomasz Pajor September 03, 2009 08:20AM

Re: location question

Igor Sysoev September 03, 2009 08:26AM

Re: location question

Tomasz Pajor September 03, 2009 09:44AM

Re: location question

Igor Sysoev September 03, 2009 09:52AM

Re: location question

Jeff Waugh September 03, 2009 10:10AM

Re: location question

Igor Sysoev September 03, 2009 08:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready