随笔分类 - Nginx
摘要:user nginx;worker_processes 1; error_log /var/log/nginx/error.log warn;pid /var/run/nginx.pid; events { worker_connections 1024;}http { include /etc/n
阅读全文
摘要:需求,域名即要能访问www.yuming.com/filename.txt文件 有要能直接访问前端页面 www.yuming.com 因为filename.txt在/data/app/web/test_env/目录下,访问/filename.txt时根目录为/data/app/web/test_en
阅读全文
摘要:if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})") { set $year $1; set $month $2; set $day $3; }access_log /home/test/access.$year-$month-$day.log main;
阅读全文
摘要:nginx常用的超时配置说明 client_header_timeout 语法 client_header_timeout time默认值 60s上下文 http server(指可以放在http块和server块)说明 指定等待client发送一个请求头的超时时间(例如:GET / HTTP/1.
阅读全文
摘要:一、限制所有单个ip的访问频率 1、http中的配置 http { #$limit_conn_zone:限制并发连接数 limit_conn_zone $binary_remote_addr zone=one1:10m; #limit_req_zone:请求频率 #$binary_remote_ad
阅读全文
摘要:nginx 匹配 请求后缀 并限制访问 location /group1 { set $dfs_url 0; if ( $request_uri = /group1 ){ set $dfs_url 1 ; } if ( $request_uri = /group1/ ){ set $dfs_url
阅读全文