I have this in /etc/nginx/conf.d/gessin.conf
server {
listen 80 ;
listen [::]:80 ;
server_name admin.example.com;
root /home/developer/www/admin;
client_body_timeout 5s;
client_header_timeout 5s;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
limit_req zone=http burst=20 delay=8;
limit_conn addr 10;
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
But nginx
complains that delay is not a correct parameter:
[root@dmz-1 developer]# nginx -c /etc/nginx/nginx.conf -t
nginx: [emerg] invalid parameter "delay=8" in /etc/nginx/conf.d/gessin.conf:14
nginx: configuration file /etc/nginx/nginx.conf test failed
Best Answer
As per Richard Smith's comment, the version is wrong. The
delay
option is valido only for nginx > 1.15.7