随笔分类 -  Nginx

摘要:替换以下命令和配置中的your.domain为你的域名 1 生成ca.key openssl genrsa -des3 -out ca.key 2048 输入ca.key的密码,4位以上 2 生成ca.crt openssl req -new -x509 -days 7305 -key ca.key 阅读全文
posted @ 2020-03-28 16:23 匠人先生 阅读(554) 评论(0) 推荐(0) 编辑
摘要:nginx配置 lua_package_path "/usr/local/openresty/lualib/resty/smtp/?.lua;;"; lua_need_request_body on; location ^~ /alarm/mail { resolver 202.106.0.20 v 阅读全文
posted @ 2019-08-05 20:47 匠人先生 阅读(885) 评论(0) 推荐(0) 编辑
摘要:openresty(nginx+lua)发http请求 利用location+proxy_pass间接实现 location ^~ /test/http { internal; proxy_pass http://test.com/path; } lua代码 local res, err = ngx 阅读全文
posted @ 2019-07-29 20:36 匠人先生 阅读(1411) 评论(0) 推荐(0) 编辑
摘要:通过location配置 location ~ \.html$ { add_header 'Cache-Control' 'no-cache'; } location ~ \.(js|css|gif|jpg|jpeg|png|bmp|swf)$) { access_log off; expires 阅读全文
posted @ 2019-07-03 15:41 匠人先生 阅读(681) 评论(0) 推荐(0) 编辑
摘要:1 proxy_ignore_headers 1.1 Set-Cookie By default, nginx does not caches requests with Set-Cookie. 默认情况下:Nginx不会缓存response中带有Set-Cookie的请求; If a header 阅读全文
posted @ 2019-06-16 22:22 匠人先生 阅读(815) 评论(0) 推荐(0) 编辑
摘要:官方:https://www.nginx.com/products/nginx-amplify/ NGINX Amplify is a SaaS‑based monitoring tool for the open source NGINX software and NGINX Plus. With 阅读全文
posted @ 2019-06-16 21:47 匠人先生 阅读(358) 评论(0) 推荐(0) 编辑
摘要:nginx location =:精确匹配(必须全部相等) ~:大小写敏感,正则匹配 ~*:忽略大小写,正则匹配 ^~:只需匹配uri部分,精确匹配 @:内部服务跳转,精确匹配 优先级: Exact match = Forward match ^~ / Case sensitive regex ~ 阅读全文
posted @ 2019-05-07 19:07 匠人先生 阅读(327) 评论(0) 推荐(0) 编辑
摘要:使用docker部署 1 下载 # wget https://github.com/doujiang24/lua-resty-kafka/archive/v0.06.tar.gz# tar xvf v0.06.tar.gz 2 准备配置文件testkafka.conf # vi testkafka. 阅读全文
posted @ 2019-03-08 22:29 匠人先生 阅读(2073) 评论(0) 推荐(0) 编辑
摘要:官方:http://nginx.org nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written 阅读全文
posted @ 2019-01-13 19:58 匠人先生 阅读(409) 评论(0) 推荐(1) 编辑
摘要:公司一个kylin集群,每到周二下午就会逐个节点OOM退出,非常有规律,kylin集群5个节点,每个节点分配的内存已经不断增加到70多G,但是问题依旧; 经排查发现,每周二下午kylin集群的请求量确实会多一些,有可能是kylin的bug,也可能是其他原因,当节点kylin进程内存占用上升时,打印线 阅读全文
posted @ 2018-12-13 11:40 匠人先生 阅读(891) 评论(0) 推荐(1) 编辑
摘要:hdfs、yarn、hbase这些组件的master支持多个,实现自动主备切换,其中hdfs、hbase无论访问主master或者备master都可以正常访问页面,但是yarn比较特别,只有主master的页面可以访问,备master会返回Refresh,3s后重定向; 一种方式是提供两个域名,分别 阅读全文
posted @ 2018-12-12 16:54 匠人先生 阅读(1708) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示