官网
点击 Alphabetical index of variables
找到 https://nginx.org/en/docs/http/ngx_http_core_module.html#var_limit_rate
$limit_rate
Limits the rate of response transmission to a client. The rate is specified in bytes per second. The zero value disables rate limiting. The limit is set per a request, and so if a client simultaneously opens two connections, the overall rate will be twice as much as the specified limit.
实操
修改配置文件
[root@VM-0-7-centos ~]# vim ng/artisan_ng/conf/nginx.conf [root@VM-0-7-centos ~]# [root@VM-0-7-centos ~]# [root@VM-0-7-centos ~]# [root@VM-0-7-centos ~]# ./ng/artisan_ng/sbin/nginx -s reload [root@VM-0-7-centos ~]#
重新访问
可以看到 $limit_rate生效了