随笔分类 -  nginx

摘要:可能原因是由于upstream的配置 轮询时间过长 阅读全文
posted @ 2020-09-08 16:27 划得戳 阅读(259) 评论(0) 推荐(0)
摘要:for ((i=1;i<=10;i++)); do list_num = $(sed -n $i'p' /tmp/ip.txt |awk '{print $1}') list_ip = $(sed -n $i'p' /tmp/ip.txt |awk '{print $2}') if [ $list_ 阅读全文
posted @ 2020-02-08 12:42 划得戳 阅读(402) 评论(0) 推荐(0)
摘要:nginx 的 default_server 指令可以定义默认的 server 出处理一些没有成功匹配 server_name 的请求,如果没有显式定义,则会选取第一个定义的 server 作为 default_server。 在了解到如上规则后,我们可以捕获未做绑定的域名访问或直接IP访问,做重定 阅读全文
posted @ 2019-04-20 13:47 划得戳 阅读(7327) 评论(1) 推荐(1)
摘要:Nginx全局变量 Nginx中有很多的全局变量,可以通过$变量名来使用。下面列举一些常用的全局变量: Nginx location location指令的作用是根据用户请求的URI来执行不同的应用。即根据用户请求的网站地址URL进行匹配,匹配成功就进行相应的操作。 location的语法规则:lo 阅读全文
posted @ 2019-04-03 09:25 划得戳 阅读(749) 评论(0) 推荐(0)
摘要:配置文件: 在需要代理的电脑上面加入环境变量: export http_proxy=http://192.168.22.18:8888 #nginx所在的IP和端口 阅读全文
posted @ 2019-01-30 11:17 划得戳 阅读(1441) 评论(0) 推荐(0)
摘要:基本使用 简单翻成中文: 阅读全文
posted @ 2018-09-17 13:52 划得戳 阅读(1176) 评论(0) 推荐(0)
摘要:location ~* /application/(admin|index)/static/.*$ { allow all; } location ~* /(applicaion|addos|coe|dta)/.*$ { deny all; 禁止访问} location ~* /(.git|.svn 阅读全文
posted @ 2018-07-30 10:18 划得戳 阅读(5766) 评论(0) 推荐(0)
摘要:#!/bin/bash fd=/tmp/log# pv 点击量echo "###################点击量 --$pv-- #########################" >> ${fd}tongji.txtpv=`cat ${fd}a.log | wc -l`echo "**** 阅读全文
posted @ 2018-01-18 11:51 划得戳 阅读(150) 评论(0) 推荐(0)
摘要:location 指令的作用是根据用户请求的URI来执行不同的应用。 locationn使用的语法为 location [=|~|~*|^~] uri { .... } location 语法说明表 location [=|~|~*|^~] uri {....} 指令 匹配标识 匹配的网站地址 匹配 阅读全文
posted @ 2017-11-01 16:33 划得戳 阅读(1233) 评论(0) 推荐(0)