F
F
FulgerX20072018-09-03 15:14:10
Nginx
FulgerX2007, 2018-09-03 15:14:10

Why limit_conn_zone and limit_req_zone return 404?

Hi all.
Why limit_conn_zone and limit_req_zone return 404?
Added to the http block:


limit_conn_zone $binary_remote_addr zone=addr:10m;
limit_conn_zone $server_name zone=perserver:10m;
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
limit_req_status 444;
limit_conn_status 503;

and in location / added :

limit_conn addr 5;
limit_conn perserver 100;
limit_req zone=one burst=5;

The restriction works all right, but instead of 503 errors it returns 404 whatever one may say.
Nginx:
nginx version: nginx/1.10.3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FulgerX2007, 2018-09-03
@FulgerX2007

Problem solved. It turned out that nginx was looking for a 503.html file to display a 503 error , but there was none. And for that it gave a 404 error .
Created a 503.html and 429.html file and the problem disappeared.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question