error_log
/usr/local/nginx/logs/error.log
crit; pid
/usr/local/nginx/nginx.pid;
worker_connections
65535;
default_type
application/octet-stream;
log_format main
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
server_names_hash_bucket_size
128;
client_header_buffer_size
32k;
large_client_header_buffers
4 32k;
client_header_timeout
3m;
######################################################################
server_name
192.168.40.25;
root
/usr/local/nginx/html/flv_file/;
error_page
500 502 503 504
/50x.html;
limit_rate_after 5m;
####在flv视频文件下载了5M以后开始限速
limit_rate 512k;
####速度限制为512K
mkdir -p /usr/local/nginx/html/flv_file/ 设置完成后使用如下命令检测配置,正常会出现如下结果 [root@localhost ~]# /usr/local/nginx/sbin/nginx -t the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok configuration file /usr/local/nginx/conf/nginx.conf test is successful [root@localhost ~]# /usr/local/nginx/sbin/nginx[root@localhost ~] # netstat -nulpt | grep 80 tcp
0
0 0.0.0.0:80
0.0.0.0:*
LISTEN
2945/nginx 在客户端使用浏览器访问,如有下面的信息,则证明成功。 |