Anonymous User
October 04, 2010 11:36AM
On Mon, Oct 04, 2010 at 01:33:23PM +0400, Boris Dolgov wrote:
> On Mon, Oct 4, 2010 at 12:04, witekfl Gazeta.pl <witekfl@gazeta.pl> wrote:
> > Hi,
> > There is in config:
> > location / {
> >     root blabla;
> -     if ($request_body ~* (blabla|bebe)) {
> + if ($request_body ~* "(blabla|bebe)") {
> >          return 404;
> >     }
> > }
> > nginx -t says invalid condition "$request_body".

I gave wrong example. There were spaces in original config.
Nevermind.

I'll answer myself.
References to $request_body must follow fastcgi_pass or proxy_pass, eg.
location / {
root blabla;
proxy_pass http://apache;
if ($request_body ~* (blabla|bebe)) {
return 404;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

How to use $request_body?

witekfl Gazeta.pl 2831 October 04, 2010 04:06AM

Re: How to use $request_body?

Boris Dolgov 1659 October 04, 2010 05:34AM

Re: How to use $request_body?

Anonymous User 1094 October 04, 2010 11:36AM

Re: How to use $request_body?

Maxim Dounin 1499 October 04, 2010 01:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 234
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