Welcome! Log In Create A New Profile

Advanced

Nginx limit_conn works but not redirecting to 503 page

Posted by chase 
Nginx limit_conn works but not redirecting to 503 page
August 02, 2010 11:29PM
I have these in nginx.conf

[quote]
limit_zone one $binary_remote_addr 10m;

location / {
root web;
index index.html;
}

server {
location /download/ {
limit_conn one 1;
}

error_page 500 502 503 /50x.html;
location = /50x.html {
root web;
}
[/quote]

If I am downloading file(1) and I try to open another connection to the same file(1), my web browser just sits there with "Connecting to..."
file(1) = http://my.domain.com/speed_test.zip

If I am downloading file(1) and I try to download file(2), I get this error in:
FireFox "Firefox can't find the file at http://my.domain.com/speed_test2.zip"
IE8: "Cannot find server"
file(1) = http://my.domain.com/speed_test.zip
file(2) = http://my.domain.com/speed_test2.zip

It seems like Nginx is blocking the request and not even sending the 503 error page.

I tried to go to the error page and it does show up:
http://my.domain.com/50x.html

What can I do to make it so that it will show the 503 error page?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 190
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready