摘要: http {... geo $whiteiplist { default 1; include limit/whiteip.conf; } map $whiteiplist $limit { 1 $binary_remote_add... 阅读全文
posted @ 2015-08-18 11:35 zenghui940 阅读(287) 评论(0) 推荐(0) 编辑
摘要: server {...include 404.conf;...}vi 404.confproxy_intercept_errors on;error_page 404 @404;error_page 503 @503;error_page 502 @502;error_page 403 @403;e... 阅读全文
posted @ 2015-08-18 11:30 zenghui940 阅读(2246) 评论(0) 推荐(0) 编辑
摘要: upstream wdzjbbs_varnish{ session_sticky; server 10.174.35.11 weight=1 max_fails=2 fail_timeout=30s; }upstream wdzjbbs{ session_sticky; ... 阅读全文
posted @ 2015-08-18 11:18 zenghui940 阅读(1563) 评论(0) 推荐(0) 编辑
摘要: 当一个域名从另一个域名调取文件时出现如下XMLHttpRequest cannot load http://www.xxx.com/header_data.html. No 'Access-Control-Allow-Origin' header is present on the requeste... 阅读全文
posted @ 2015-08-18 11:03 zenghui940 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1,之前遇到过这样的一个情况,公司内网有些爬虫要把所爬取的内容加入到数据库中,但是晚上需要拒绝连接,下面是我第一次设置 iptables -I INPUT -s ip -j DROP #发现这样设置并不能阻止它进来,后来修改如下可以了(有可以像数据库这种连接是不是长连接导致的) iptables - 阅读全文
posted @ 2015-08-18 10:59 zenghui940 阅读(234) 评论(0) 推荐(0) 编辑
摘要: ssh安全问题虽然不是特别的重要,但是如果被别人暴力破取的话那么可想而知了1,/etc/hosts.allow /etc/hosts.deny先把需要允许的ip加入到hosts.allow,如下:vi /etc/hosts.allowsshd:201.53.22.11sshd:10. ... 阅读全文
posted @ 2015-08-17 10:10 zenghui940 阅读(705) 评论(0) 推荐(0) 编辑
摘要: 通过nginx返回的状态码来判断url该怎么走,如下是tomcat的静态化操作,当nginx去访问静态文件时,如果没有找到会丢给tomcat去处理 location ^~ /zenghui { root /www_root; proxy_intercept_error... 阅读全文
posted @ 2015-07-01 13:51 zenghui940 阅读(2740) 评论(0) 推荐(0) 编辑
摘要: 2015/05/22 11:10:42 [error] 25164#0: *24170881 upstream sent too big header while reading response header from upstream, client: 58.247.43.226, server... 阅读全文
posted @ 2015-05-22 11:18 zenghui940 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1,下面有这个例子vi a.txt1 2 3vi a.shecho $1 $2 $3vi c.shaa=`cat a.txt`./a.sh $aash c.sh 1 2 3注意:红色$aa没有加双引号,如果把$aa加上双引号那么$aa就会是一个整体了,所以在这里我们不加双引号,因为默认IFS是以空格... 阅读全文
posted @ 2015-05-22 08:13 zenghui940 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 1, $*与$@区别cat a.sh#!/bin/bashfor i in $* #这里换成$@也是一样的结果doecho $idonesh a.sh 1 '2 3'123vi a.shfor i in "$*"...sh a.sh 1 '2 3'1 2 3vi a.shfor i in "$@".... 阅读全文
posted @ 2015-05-22 07:59 zenghui940 阅读(129) 评论(0) 推荐(0) 编辑