摘要: 访问域名 www.adc.com/image 自动跳转到 www.adc.com/make/image 这个如何写 这种需求有多种方法可以实现:1. 利用Nginx rewrite 内部跳转实现: location /image { rewrite ^/image/(.*)$ /make/image 阅读全文
posted @ 2018-07-06 10:20 jcici 阅读(8607) 评论(0) 推荐(0) 编辑
摘要: 在logstash中nginx配置一般分为两种格式: 1、nginx配置$time_local 获取到的日志通常为 192.168.29.7 - - [26/Jun/2018:15:21:42 +0800] "GET /images/logo3.png HTTP/1.1" 304 0 "-" "Mo 阅读全文
posted @ 2018-06-26 15:50 jcici 阅读(7456) 评论(0) 推荐(0) 编辑
摘要: 函数 一、定义和使用函数 def 函数名(参数): ... 函数体 ... 函数的定义主要有如下要点: def:表示函数的关键字 函数名:函数的名称,日后根据函数名调用函数 函数体:函数中进行一系列的逻辑计算,如:发送邮件、计算出 [11,22,38,888,2]中的最大数等... 参数:为函数体提 阅读全文
posted @ 2018-05-03 14:49 jcici 阅读(209) 评论(0) 推荐(0) 编辑
摘要: zabbix监控tengine upstream状态 公司nginx代理中,每个域名都会有几条线路,现需要在几条线路同时不通的时候,会触发zabbix报警。 1、在zabbix主机上面添加计划任务 */1 * * * * /home/pb/tengine_upstream.sh cat /home/ 阅读全文
posted @ 2018-04-28 11:03 jcici 阅读(819) 评论(0) 推荐(0) 编辑
摘要: Yum/RPM 安装nginx添加模块 在部署的时候,为了方便,使用yum安装,后来由于之前的安装模块无法满足需求,这时候就需要新增模块了 1、查看已经安装模块 /usr/sbin/nginx -V 先将配置拷贝出来 2、安装编译必备组件 yum -y install gcc pcre-devel 阅读全文
posted @ 2018-04-27 16:30 jcici 阅读(1658) 评论(0) 推荐(0) 编辑
摘要: 反向代理与 Real-IP 和 X-Forwarded-For 一、虚拟机准备环境 客户端:192.168.29.7 proxy1:192.168.32.230 proxy2:192.168.32.231 proxy3:192.168.32.232 real server:192.168.32.24 阅读全文
posted @ 2018-04-27 16:21 jcici 阅读(895) 评论(0) 推荐(0) 编辑
摘要: python基础 一、整数 如: 18、73、84 每一个整数都具备如下功能: 1 class int(object): 2 """ 3 int(x=0) -> int or long 4 int(x, base=10) -> int or long 5 6 Convert a number or 阅读全文
posted @ 2018-04-26 11:02 jcici 阅读(317) 评论(0) 推荐(0) 编辑