Can anyone help me with nginx "location" I want to add this block to my nginx conf
location / {
limit_conn zone_name 8;
}
I need to modify location to /folder/index.php?file=x Where x can be an string (e.g 7fe8j)
Thanks
Can anyone help me with nginx "location" I want to add this block to my nginx conf
location / {
limit_conn zone_name 8;
}
I need to modify location to /folder/index.php?file=x Where x can be an string (e.g 7fe8j)
Thanks
I need to modify
location
to/folder/index.php?file=x
Where x can be an string (e.g 7fe8j)
The short answer is you can't.
limit_conn
directive only works in http
, server
, location
context. And location
directive only match against the URI (/folder/index.php
) without query parameters (?file=x
).
?file
can be match by using if ($args ~ "^file=(.*)") {
but you'll get the [emerg] "limit_conn" directive is not allowed here in
message if you put a limit_conn
directive inside.