If generic statement

Hello,

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?

Regards

On Apr 23, 2008, at 10:35 AM, Renaud Allard wrote:

virtual hosts without having to put includes in every server
declaration?

Regards

what i do for these is:

put the rule in a file like checks.conf

then in each server or location

include the file.

actually it is a bit more complicated as multiple files get included in

SHARED.conf

which is then included. but you get the idea.
if you control all the virtual host conf files then that can work.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs