Score:0

Nginx error_page not working for ngx_http_limit_conn_module

in flag

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!

Nish R avatar
in flag
I know I have duplicate `error_page` but that shouldn't matter
Michael Hampton avatar
cz flag
Where does your custom error page come from?
Nish R avatar
in flag
@MichaelHampton its located in `/usr/share/nginx/error/429.html`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.