I have an http block where i define limit_conn_zone
like so:
limit_conn_zone $host zone=test:10m;
and i have a reference to another .conf
file where I have my server configuration
server {
..
...
limit_conn_dry_run off;
limit_conn test 2;
limit_conn_log_level error;
limit_conn_status 429;
error_page 429 /429.html;
...
....
..
error_page 429 /429.html;
location = /429.html {
root /usr/share/nginx/error;
}
I have verified that 429.html
file exists in /usr/share/nginx/error
. My goal is that
I want to have my own custom error page shown instead of nginx's default error page(which is what is happening currently). Am I missing something? I tried to follow https://stackoverflow.com/questions/49471131/is-there-a-way-to-display-an-error-for-the-user-when-using-nginx-limit-conn-modu but didn't get anywhere. Thanks!