I'm using nginx v1.2.6 along with php5-fpm on Debian. I would like to block POST requests containing a certain word so I have used the following config
server {
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
if ($request_body ~* word) {
return 403;
}
}
}
But i doesn't work at all.
server {
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
if ($request_body ~* word) {
return 403;
}
}
}
But i doesn't work at all.