Welcome! Log In Create A New Profile

Advanced

Re: Proxy cache for php site

November 09, 2011 08:18AM
lpugoy Wrote:
> Hello.
>
> Thank you for the explanation. I now understand
> the problem and it is now working.
>
> I want to add a condition where if a cookie with
> the name sess_id is included in the request, then
> the cache would be bypassed. I tried the following
>
>
> if ($http_cookie ~* "sess_id") {
> set $no_cache "1";
> }
>
> proxy_no_cache $no_cache;
> proxy_cache_bypass $no_cache;
>
> but it doesn't seem to work. What is the correct
> way to do this? Thank you very much.

An update. I don't think that the if statement is being entered. There are these messages in the debug log


2011/11/09 21:14:03 [debug] 6397#0: *3 http script var
2011/11/09 21:14:03 [debug] 6397#0: *3 http script regex: "sess_id"
2011/11/09 21:14:03 [notice] 6397#0: *3 "sess_id" does not match "", client: 10.214.99.16, server: *.site.com, request: "GET / HTTP/1.1", host: "www.site.com"
2011/11/09 21:14:03 [debug] 6397#0: *3 http script if
2011/11/09 21:14:03 [debug] 6397#0: *3 http script if: false

Is there another way I can test for existence of cookies?
Subject Author Posted

Proxy cache for php site

Jon Bennett October 15, 2011 07:42PM

Re: Proxy cache for php site

António P. P. Almeida October 15, 2011 08:52PM

Re: Proxy cache for php site

Jon Bennett October 15, 2011 09:18PM

Re: Proxy cache for php site

António P. P. Almeida October 15, 2011 10:56PM

Re: Proxy cache for php site

Jon Bennett October 16, 2011 08:26AM

Re: Proxy cache for php site

Jon Bennett October 16, 2011 07:04PM

Re: Proxy cache for php site

lpugoy November 08, 2011 07:55AM

Re: Proxy cache for php site

Francis Daly November 08, 2011 04:30PM

Re: Proxy cache for php site

Maxim Dounin November 08, 2011 04:32PM

Re: Proxy cache for php site

lpugoy November 09, 2011 06:02AM

Re: Proxy cache for php site

lpugoy November 09, 2011 08:18AM

Re: Proxy cache for php site

lpugoy November 10, 2011 02:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready