打印

[Nginx] Nginx 限制单个IP的并发连接数及对每个连接速度(限速)

"limit_zone" directive is not allowed here

提示错误:root@debian:~# /etc/init.d/nginx restartRestarting nginx daemon: nginxnginx: [emerg] "limit_zone" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:11nginx already running.


LNMP一键安装包最新版本1.0,

下面是

nginx.conf前面的 配置代码:



user  www www;worker_processes 1;
error_log  /home/wwwlogs/nginx_error.log
crit;pid        
/usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;

limit_zone oneip $binary_remote_addr 10m;

events{use epoll;worker_connections 51200;}

TOP