Is there a way to configure nginx not to block request from a specific IP address?
machineatube
nginx-forum at nginx.us
Thu Sep 17 17:56:34 MSD 2009
Igor Sysoev Wrote:
-------------------------------------------------------
> On Thu, Sep 17, 2009 at 03:56:20AM -0400,
> machineatube wrote:
>
> > here is my conf file , the nginx version is
> 0.7.36
> > I just used the default config.
> >
> >
> > worker_processes 1;
> >
> > events {
> > worker_connections 1024;
> > }
> >
> >
> > http {
> > include mime.types;
> > default_type application/octet-stream;
> >
> >
> >
> > sendfile on;
> >
> > keepalive_timeout 0;
> >
> >
> > server {
> > listen 80;
> > server_name localhost;
> >
> >
> >
> > location / {
> >
> > root html;
> > index index.html index.htm;
> > }
> >
> >
> > error_page 500 502 503 504 /50x.html;
> > location = /50x.html {
> > root /web;
> > #root html;
> > }
> >
> > }
> > }
>
> Here is nothing that may prevent processing more
> than 4 requests.
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
thanks,
my bad, it is because I did not change the net bind parameter in windows regedit,( I connect to a linux virtual machine from my windows machine). and it works now, all request could be responsed.
but I found another question is that when I put about 50000 static files(all files are less than 1k bytes) under the linux machine folder, I can run at about 240 requests per second, but after I put 1 million files under that folder and still I run the same loops, I can only run at 95 request per second, why does that happen? is there something specific I need to set in nginx or I need to change some settings in the linux envrioment?(my test linux machine system: ubuntu LTS 8.04 on vmware single processor, p4 2.8g, 7200rpm, a normal machine, the ulimit -n is 1024)
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,7318,7451#msg-7451
More information about the nginx
mailing list