if generic statement

Renaud Allard renaud at llorien.org
Wed Apr 23 18:35:58 MSD 2008


I would like to make some statements such as:
if ($query_string ~ "someregex") {
return 403;
To implement some mod_security like features for proxied web sites.

But I see I can only use the "if" statement in the context of location
or server. Is there a way to implement it as a generic rule for all
virtual hosts without having to put includes in every server declaration?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3291 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://nginx.org/pipermail/nginx/attachments/20080423/4d0dd100/attachment.bin>

More information about the nginx mailing list