随笔分类 - nginx
摘要:worker_processes 设置为CPU总核数量 worker_cpu_affinity 多少个cpu多少个0 worker_rlimit_nofile配置要和系统的单进程打开文件数一致 events { #作为http时worker_processes*worker_connections
阅读全文
摘要:设置nginx变量 set $domail_url "$host$request_uri";判断并重定向if ($domail_url = '123.com/about/'){ rewrite ^/(.*)$ http://123.net/$1 permanent; }
阅读全文
摘要:location ~ /server/ { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_s
阅读全文
摘要:#获取日期 date=`date +"%y%m%d"` #设置日志路径 data="/data/logs/abc.com/access.log" #配置文件路径 conf="/usr/local/nginx/conf/selfconf/abc.conf" #设置要监控的地址,多个地址用空格隔开,监控全局设为null url='/pub/send/yzm/' #白名单IP Whitelist="1...
阅读全文

浙公网安备 33010602011771号