<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post/10291/</link>
<title><![CDATA[[纳入备查]TCP 半连接队列和全连接队列]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Tue, 17 Sep 2019 02:58:08 +0000</pubDate> 
<guid>http://jackxiang.com/post/10291/</guid> 
<description>
<![CDATA[ 
	netstat -s &#124; egrep &quot;listen&#124;LISTEN&quot; <br/>Fri May&nbsp;&nbsp;5 15:39:59 CST 2017<br/>1641906 times the listen queue of a socket overflowed<br/>1641906 SYNs to LISTEN sockets ignored<br/><br/><br/>ss -lnt<br/>State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Recv-Q Send-Q&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Local Address:Port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Peer Address:Port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>LISTEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;300&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *:3307&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>LISTEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;511&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *:80&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/><br/><br/>ss -lnt<br/>Recv-Q Send-Q Local Address:Port&nbsp;&nbsp;Peer Address:Port <br/>0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *:3306&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *:* <br/>上面看到的第二列Send-Q 表示第三列的listen端口上的全连接队列最大为50，第一列Recv-Q为全连接队列当前使用了多少<br/><br/>全连接队列的大小取决于：min(backlog, somaxconn) . backlog是在socket创建的时候传入的，somaxconn是一个os级别的系统参数<br/><br/>半连接队列的大小取决于：max(64, /proc/sys/net/ipv4/tcp_max_syn_backlog)。 不同版本的os会有些差异<br/><br/><br/>来自：https://blog.csdn.net/Tanswer_/article/details/78375317
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/10274/</link>
<title><![CDATA[[实践OK]来自swoole的课程里讲的需要规避的CentOS 大量的TIME_WAIT解决方法,time_wait状态产生的原因，危害，如何避免]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Thu, 29 Aug 2019 01:05:28 +0000</pubDate> 
<guid>http://jackxiang.com/post/10274/</guid> 
<description>
<![CDATA[ 
	TimeWait过多时，两个方面做处理：<br/>1）打开：<br/>cat /etc/sysctl.conf&#124;grep&nbsp;&nbsp;-Eri &quot;reuse&#124;timestamps&#124;local_port_range&quot; <br/>net.ipv4.ip_local_port_range = 2000 65000&nbsp;&nbsp; #CS模型的C端端口范围增大到65000<br/>net.ipv4.tcp_timestamps = 1<br/>net.ipv4.tcp_tw_reuse&nbsp;&nbsp;= 1&nbsp;&nbsp; #这个是重用客户端的四元里的二元，这个容易和tcp_tw_recycle 记混，下面这个tcp_tw_recycle这个项最好关掉，容易出现并引发疑难问题。<br/>如果是安全可控制，可以复用处于TIME_WAIT的套接字为新的连接所用。1）只适用于连接发起方。 也就是CS模型的客户端。2）对应TIME_WAIT状态的连接创建超过1秒才可以被复用。所以，上面这个net.ipv4.tcp_timestamps = 1 ，也就是是打开对TCP时间戳的支持，默认即为1秒。<br/><br/>net.ipv4.ip_local_port_range = 1024 65535&nbsp;&nbsp; #调大<br/><br/>2）关闭：<br/>不要开启：net.ipv4.tcp_tw_recycle = 1&nbsp;&nbsp; #不关容易出现并引发疑难问题<br/>cat /etc/sysctl.conf&#124;grep&nbsp;&nbsp;-Eri &quot;tcp_tw_recycle&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>net.ipv4.tcp_tw_recycle = 1<br/><br/>=======================================================================<br/>出现在redis在PHP里主动关闭高并发时候，redis在php-fpm请求完关了，可能是php主动关了，被动方认为有错误发生。<br/>taimwait主要是把本地发起请求的端口范围给占满了，出现client不可用新端口client到server。<br/><br/>假设发起主动关闭的一方（client）最后发送的ACK在网络中丢失，由于TCP协议的重传机制，执行被动关闭的一方（server）将会重发其FIN，在该FIN到达client之前，client必须维护这条连接状态，也就说这条TCP连接所对应的资源（client方的local_ip,local_port）不能被立即释放或重新分配，直到另一方重发的FIN达到之后，client重发ACK后，经过2MSL时间周期没有再收到另一方的FIN之后，该TCP连接才能恢复初始的CLOSED状态。如果主动关闭一方不维护这样一个TIME_WAIT状态，那么当被动关闭一方重发的FIN到达时，主动关闭一方的TCP传输层会用RST包响应对方，这会被对方认为是有错误发生，然而这事实上只是正常的关闭连接过程，并非异常。<br/><br/>摘自：https://blog.csdn.net/huangyimo/article/details/81505558<br/><br/><br/>参数调整：<br/>CentOS 大量的TIME_WAIT解决方法:<br/>TIME_WAIT状态的连接，通过调整内核参数解决，<br/><br/>vi /etc/sysctl.conf 编辑文件，加入以下内容：<br/><br/>net.ipv4.tcp_syncookies = 1<br/>net.ipv4.tcp_tw_reuse = 1<br/>net.ipv4.tcp_tw_recycle = 1<br/>net.ipv4.tcp_fin_timeout = 30 然后执行<br/><br/>/sbin/sysctl -p让参数生效。<br/><br/>net.ipv4.tcp_syncookies = 1 表示开启SYN Cookies。当出现SYN等待队列溢出时，启用cookies来处理，可防范少量SYN攻击，默认为0，表示关闭；<br/><br/>net.ipv4.tcp_tw_reuse = 1 表示开启重用。允许将TIME-WAIT sockets重新用于新的TCP连接，默认为0，表示关闭；<br/><br/>net.ipv4.tcp_tw_recycle = 1 表示开启TCP连接中TIME-WAIT sockets的快速回收，默认为0，表示关闭。<br/><br/>net.ipv4.tcp_fin_timeout 修改系統默认的 TIMEOUT 时间<br/><br/>修改之后，再用<br/><br/>netstat -n -p -t发现大量的TIME_WAIT 已不存在，网站访问正常！<br/><br/><br/>来自：https://www.bbsmax.com/A/ZOJPgOYyzv/
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/10247/</link>
<title><![CDATA[[实践OK]如何关闭或指定nginx错误日志位置？如何关闭或指定nginx错误日志位置？]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Fri, 19 Jul 2019 03:49:55 +0000</pubDate> 
<guid>http://jackxiang.com/post/10247/</guid> 
<description>
<![CDATA[ 
	背景：发现Nginx启动时都会去创建/usr/lcoal/nginx/logs下面的文件，且越写越大，而能不能去掉或不写入日志，乃至放别的非nginx 的安装目录呢，说是不能，也有说能的。<br/>禁用错误日志的语法是可以的，但是文档声明在读取配置之前使用默认日志文件。（这似乎是合理的，因为它会如何告诉你你的配置有错误）<br/>mkdir /usr/local/nginx/logs/&nbsp;&nbsp;#先让它启动起来，但是经过下面配置后不会再写入日志了。<br/>nginx.conf里：<br/>user www;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>worker_processes 3;<br/><br/>worker_rlimit_nofile 51200;<br/>error_log /dev/null crit;<br/>http &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;access_log off;<br/>&#125;<br/><br/>结果：<br/>du -sh /usr/local/nginx/logs/*<br/>4.0K&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/nginx/logs/access.log<br/>4.0K&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/nginx/logs/error.log<br/><br/>来自：https://cloud.tencent.com/developer/ask/54829<br/><br/><br/>我在启动nginx时使用-p参数解决了这个问题，例如：<br/><br/>/home/ubuntu/nginx/sbin/nginx -c /home/ubuntu/nginx/conf/nginx.conf -p /data/logs/nginx<br/>这将在配置中指定的任何日志路径前面加上前缀目录。<br/><br/>这个能指向别的目录，但是Nginx会加个 logs/error.log 这样的log,如：<br/>/data/logs/nginx/logs/error.log<br/><br/>来自：https://cloud.tencent.com/developer/ask/54829
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/9967/</link>
<title><![CDATA[[实践OK]一边制造，一边讲解http状态码502504499500]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Fri, 30 Nov 2018 16:02:17 +0000</pubDate> 
<guid>http://jackxiang.com/post/9967/</guid> 
<description>
<![CDATA[ 
	实践来自：https://mp.weixin.qq.com/s/TFRv2wfaNpje_5rrELBEgA<br/><br/>定义<br/>==============================================================================================<br/>502，Bad Gateway，网关错误，它往往表示网关从上游服务器中接收到的响应是无效的，主要是PHP执行时间大于PHP超时，于是给Nginx返回为空引起的。<br/>502并不是指网关本身出了问题，而是<br/>1）从上游接收响应出了问题，比如由于上游服务自身超时导致不能产生响应数据，<br/>2）或者上游不按照协议约定来返回数据导致网关不能正常解析。<br/><br/><br/>情况1：关掉PHP-FPM进程：<br/>&quot;123.115.119.90&quot; &quot;up.levoo.com&quot; &quot;-&quot; &quot;[30/Nov/2018:22:51:52 +0800]&quot; &quot;GET /hello.php HTTP/1.1&quot; &quot;502&quot; &quot;552&quot; &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36&quot; &quot;0.000&quot; &quot;0.000&quot;<br/>2018/11/30 22:51:52 [crit] 29084#0: *124 connect() to unix:/dev/shm/php-fcgi.sock failed (2: No such file or directory) while connecting to upstream, client: 123.115.119.90, server: up.levoo.com, request: &quot;GET /hello.php HTTP/1.1&quot;, upstream: &quot;fastcgi://unix:/dev/shm/php-fcgi.sock:&quot;, host: &quot;up.levoo.com&quot;<br/><br/>情况2：<br/><textarea name="code" class="php" rows="15" cols="100">
&lt;?php

sleep(7); 

echo &#039;hello world&#039;;

?&gt;
</textarea><br/>php-fpm.conf配置：<br/><br/>request_terminate_timeout=5<br/>nginx配置：<br/>fastcgi_read_timeout 10;<br/><br/>php-fpm.conf设置的最大执行时间是5s，但是php脚本需要的执行时间大于7s，所以php-fpm进程执行5s时就回退出，此时php脚本没有正常执行完，返回给网关Nginx的数据为空，于是导致502。<br/>502日志：<br/>&quot;123.115.119.90&quot; &quot;up.levoo.com&quot; &quot;-&quot; &quot;[30/Nov/2018:22:53:14 +0800]&quot; &quot;GET /hello.php HTTP/1.1&quot; &quot;502&quot; &quot;552&quot; &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36&quot; &quot;5.287&quot; &quot;5.288&quot;<br/>2018/11/30 22:53:14 [error] 29084#0: *188 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 123.115.119.90, server: up.levoo.com, request: &quot;GET /hello.php HTTP/1.1&quot;, upstream: &quot;fastcgi://unix:/dev/shm/php-fcgi.sock:&quot;, host: &quot;up.levoo.com&quot;<br/><br/>在实际的实践中发现当在EasySwoole里传大于设置的图片也会出现 Nginx的代理机上出现104: Connection reset by peer的情况。<br/><br/>==============================================================================================<br/><br/>504:nginx则以为上游php-fpm没有按照设置时间超过Nginx的等待时间，返回响应数据就会返回504。<br/>504，Gateway Timeout，网关超时。<br/><br/>它表示网关没有从上游及时获取响应数据。注意它和502在超时场景下的区别，502是指上游php-fpm因为超过自身允许的执行时间而不能正常生成响应数据，而504是指在php-fpm还未执行完成的某一时刻，由于超过了nginx自身的超时时间，nginx则以为上游php-fpm没有按照设置时间返回响应数据就会返回504， 此时对于php-fpm而言还会继续执行下去，直到执行完成。<br/><br/>&lt;?php<br/><br/>sleep(7); <br/><br/>echo &#039;hello world&#039;;<br/><br/>error_log(&quot;hello&quot;, 3, &quot;/tmp/hello.log&quot;);<br/><br/>?&gt;<br/><br/>vi php-fpm.d/www.conf<br/>request_terminate_timeout = 30s<br/><br/>vi nginx.conf<br/>fastcgi_read_timeout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5s;<br/><br/><br/>504 Gateway Time-out<br/>nginx<br/><br/>&quot;123.115.119.90&quot; &quot;up.levoo.com&quot; &quot;-&quot; &quot;[30/Nov/2018:23:52:04 +0800]&quot; &quot;GET /hello.php HTTP/1.1&quot; &quot;504&quot; &quot;562&quot; &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36&quot; &quot;5.005&quot; &quot;5.005&quot;<br/>2018/11/30 23:52:0<br/><br/><br/>==============================================================================================<br/>499, Client Closed Request， 客户端主动断开连接。<br/>是指一次http请求在客户端指定的时间内没有返回响应，此时，客户端会主动断开连接，此时表象为客户端无响应返回，而nginx的日志中会status code 为499。<br/><br/>此状态码在浏览器请求时几乎不可见，因为浏览器默认的超时时间会很长。多见于服务之间的调用，在业务架构中常常会分层设计，拆分为不同的子系统或者微服务，这样系统之间就会常常通过http方式来请求，并且会设置每次请求的超时时间，当请求在请求时间内所调用的上游服务无返回，则会主动关闭连接，上游服务日志中会记录一条499。<br/><br/>php代码<br/><br/>&lt;?php<br/><br/>sleep(7); <br/><br/>echo &#039;hello world&#039;;<br/><br/>error_log(&quot;hello&quot;, 3, &quot;/tmp/hello.log&quot;);<br/><br/>?&gt;<br/>php-fpm.conf配置：<br/><br/>request_terminate_timeout=30<br/>nginx配置：<br/><br/>fastcgi_read_timeout 5;<br/>我们在linux终端使用curl命令来请求，-m 表示超时时间，单位为秒<br/><br/>curl -i -m 3 http://127.0.0.1/hello.php <br/>返回为：<br/><br/>curl: (28) Operation timed out after 3004 milliseconds with 0 bytes received<br/>nginx的access日志的code为499，如下：<br/><br/>&quot;HEAD /hello.php HTTP/1.1&quot; 499 0 <br/><br/><br/>#curl -I -m 3 http://up.levoo.com/hello.php <br/>curl: (28) Operation timed out after 3022 milliseconds with 0 bytes received<br/>Nginx日志：<br/>&quot;47.94.88.237&quot; &quot;up.levoo.com&quot; &quot;-&quot; &quot;[30/Nov/2018:23:55:38 +0800]&quot; &quot;GET /hello.php HTTP/1.1&quot; &quot;499&quot; &quot;0&quot; &quot;-&quot; &quot;curl/7.55.1&quot; &quot;2.888&quot; &quot;-&quot;<br/><br/>==============================================================================================<br/>500<br/>500, Internal Server Error , 服务器内部错误，服务器遇到了一个未曾预料的状况，导致了它无法完成对请求的处理。<br/><br/>日常开发中500错误几乎都是由于php脚本语法出现错误导致php-fpm无法正常执行。<br/><br/>复现路径<br/>php代码:<br/><br/>&lt;?php<br/>echo &#039;hello &#039;<br/>echo &#039; world&#039;;<br/>?&gt;<br/>由于php代码语法错误，php-fpm执行失败，然后告诉nginx这一结果，nginx则返回500。<br/>该网页无法正常运作 up.levoo.com 目前无法处理此请求。<br/>HTTP ERROR 500<br/><br/>Nginx错误日志：<br/>&quot;123.115.119.90&quot; &quot;up.levoo.com&quot; &quot;-&quot; &quot;[30/Nov/2018:23:57:42 +0800]&quot; &quot;GET /hello.php HTTP/1.1&quot; &quot;500&quot; &quot;5&quot; &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36&quot; &quot;0.022&quot; &quot;0.022&quot;<br/><br/>php错误日志：<br/>hello.php on line 3
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/9400/</link>
<title><![CDATA[[windows远程桌面 mstsc ]windows使用MMC管理多个远程桌面，默认的MMC只有一个窗口，左侧没有列表，这个有可以控制多台，切换方便管理方便。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Tue, 08 Aug 2017 06:36:54 +0000</pubDate> 
<guid>http://jackxiang.com/post/9400/</guid> 
<description>
<![CDATA[ 
	用Win+R 打开运行界面，输入mmc：<br/>点击在新窗口中浏览此图片<br/>在打开的控制台界面，从菜单中选择“文件”-“添加或删除管理单元”，然后从“可用的管理单元”添加“远程桌面”到“所选的管理单元”中，点击“确定”：<br/>点击在新窗口中浏览此图片<br/>最后，右键点击“远程桌面”-“添加新连接”，输入需管理的客户端IP地址即可访问。<br/>=======================================================================================<br/><br/>背景：10台Windows Server 2012上面装上盗版的Loadrunner，想假装很专业的做一下接口测试。要根据自己的32位还是64位下载安装后，那个控制面板里的打开和关闭Windows功能才有角色管理工具-&gt;远程桌面服务工具。<br/><br/> 对于远程管理Windows 机器来说，远程连接可能是用得最频繁的。过去，我总是把远程连接保存为.rdp 文件，以方便双击后自动连接。如果有多台机器需要管理，可以放在某个目录中，但总觉得这样的方式很笨。直到今天，在客户现场，无意中发现MMC 中是可以加入“远程管理”功能的。回来找资料看了一下，觉得还不错，特适用于同时连接多台机器的情况。<br/><br/>一、界面<br/>描述前，先给个使用界面看看吧：<br/>点击在新窗口中浏览此图片<br/>对于【附件】中的【远程桌面连接】（即mstsc.exe）来说，主要是管理更方便了，只需一个.msc 文件即能轻松打开管理窗口，并在多个连接窗口之间切换。屏幕分辨率可设定，但似乎没有提供全屏的功能。<br/><br/>二、安装及配置<br/>该MMC 使用的远程桌面组件，实际上是服务器平台提供的功能，所以，在默认的桌面系统中是没有提供的，需要独立安装。以Windows 7为例，步骤有：<br/>1、下载组件<br/>从下面的连接中下载“Windows 7 远程服务器管理工具”：<br/>点击：http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&amp;FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d#filelist<br/><br/>下载前，请留意页面中的说明，包括：<br/>引用<br/>a、仅可以安装在运行企业版、专业版或旗舰版 Windows 7 的计算机上；<br/>b、安装管理工具包的计算机上 Administrators 组的成员；<br/>c、根据运行版本不同，下载适用于x86或x86_64 平台的程；<br/>d、下载后的包，后缀名为.msu，双击即可安装（若使用第三方工具下载，后缀名可能会被修改）。<br/><br/>2、远程桌面功能<br/>安装完毕后，依次打开：“控制面板”-“程序和功能”-“打开或关闭Windows功能”-“远程服务器管理工具”-“角色管理工具”，勾选下面的“远程桌面服务工具”：<br/>点击在新窗口中浏览此图片<br/><br/>3、在MMC中添加远程管理组件<br/>用Win+R 打开运行界面，输入mmc：<br/>点击在新窗口中浏览此图片<br/>在打开的控制台界面，从菜单中选择“文件”-“添加或删除管理单元”，然后从“可用的管理单元”添加“远程桌面”到“所选的管理单元”中，点击“确定”：<br/>点击在新窗口中浏览此图片<br/>最后，右键点击“远程桌面”-“添加新连接”，输入需管理的客户端IP地址即可访问。<br/><br/>4、分辨率问题<br/>创建连接后，右键点击该连接，选择“属性”，在“屏幕选项”中可设置分别率：<br/>点击在新窗口中浏览此图片<br/>建议使用“填充MMC 结果窗格”，确定后，通过工具栏上的图标，关闭多余的显示窗口：<br/>点击在新窗口中浏览此图片<br/>关闭MMC （保存为.msc 文件）。重新打开，即可满屏显示远程终端窗口。<br/><br/><br/>摘自 ：http://www.linuxfly.org/read.php?561
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/9250/</link>
<title><![CDATA[curl -XGET http://baidu.com和 curl -XPOST http://baidu.com的Tcp流区别。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Sat, 24 Jun 2017 04:35:14 +0000</pubDate> 
<guid>http://jackxiang.com/post/9250/</guid> 
<description>
<![CDATA[ 
	内容：<br/>curl -XGET http://baidu.com<br/><br/>GET / HTTP/1.1<br/>User-Agent: curl/7.29.0<br/>Host: baidu.com<br/>Accept: */*<br/><br/>HTTP/1.1 200 OK<br/>Date: Fri, 31 Mar 2017 03:56:42 GMT<br/>Server: Apache<br/>Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT<br/>ETag: &#039;51-47cf7e6ee8400&#039;<br/>Accept-Ranges: bytes<br/>Content-Length: 81<br/>Cache-Control: max-age=86400<br/>Expires: Sat, 01 Apr 2017 03:56:42 GMT<br/>Connection: Keep-Alive<br/>Content-Type: text/html<br/><br/>&lt;html&gt;<br/>&lt;meta http-equiv=&#039;refresh&#039; content=&#039;0;url=http://www.baidu.com/&#039;&gt;<br/>&lt;/html&gt;<br/><br/><br/><br/>curl -XPOST http://baidu.com<br/><br/><br/>POST / HTTP/1.1<br/>User-Agent: curl/7.29.0<br/>Host: baidu.com<br/>Accept: */*<br/><br/>HTTP/1.1 200 OK<br/>Date: Fri, 31 Mar 2017 03:59:50 GMT<br/>Server: Apache<br/>Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT<br/>ETag: &#039;51-47cf7e6ee8400&#039;<br/>Accept-Ranges: bytes<br/>Content-Length: 81<br/>Cache-Control: max-age=86400<br/>Expires: Sat, 01 Apr 2017 03:59:50 GMT<br/>Connection: Keep-Alive<br/>Content-Type: text/html<br/><br/>&lt;html&gt;<br/>&lt;meta http-equiv=&#039;refresh&#039; content=&#039;0;url=http://www.baidu.com/&#039;&gt;<br/>&lt;/html&gt;<br/><br/><br/><br/>Post加个参数：<br/>curl -XPOST http://baidu.com -d&#039;say=hello&#039;<br/><br/>POST / HTTP/1.1<br/>User-Agent: curl/7.29.0<br/>Host: baidu.com<br/>Accept: */*<br/>Content-Length: 9<br/>Content-Type: application/x-www-form-urlencoded<br/><br/>say=helloHTTP/1.1 200 OK<br/>Date: Fri, 31 Mar 2017 04:03:47 GMT<br/>Server: Apache<br/>Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT<br/>ETag: &#039;51-47cf7e6ee8400&#039;<br/>Accept-Ranges: bytes<br/>Content-Length: 81<br/>Cache-Control: max-age=86400<br/>Expires: Sat, 01 Apr 2017 04:03:47 GMT<br/>Connection: Keep-Alive<br/>Content-Type: text/html<br/><br/>&lt;html&gt;<br/>&lt;meta http-equiv=&#039;refresh&#039; content=&#039;0;url=http://www.baidu.com/&#039;&gt;<br/>&lt;/html&gt;<br/><br/><br/><br/>Get里加个参数：<br/>curl -XGET http://baidu.com?say=hello<br/><br/>GET /?say=hello HTTP/1.1<br/>User-Agent: curl/7.29.0<br/>Host: baidu.com<br/>Accept: */*<br/><br/>HTTP/1.1 200 OK<br/>Date: Fri, 31 Mar 2017 04:05:06 GMT<br/>Server: Apache<br/>Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT<br/>ETag: &#039;51-47cf7e6ee8400&#039;<br/>Accept-Ranges: bytes<br/>Content-Length: 81<br/>Cache-Control: max-age=86400<br/>Expires: Sat, 01 Apr 2017 04:05:06 GMT<br/>Connection: Keep-Alive<br/>Content-Type: text/html<br/><br/>&lt;html&gt;<br/>&lt;meta http-equiv=&#039;refresh&#039; content=&#039;0;url=http://www.baidu.com/&#039;&gt;<br/>&lt;/html&gt;<br/>
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/9249/</link>
<title><![CDATA[curl -XGET http://baidu.com和 curl -XPOST http://baidu.com的Tcp流区别。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Sat, 24 Jun 2017 04:34:05 +0000</pubDate> 
<guid>http://jackxiang.com/post/9249/</guid> 
<description>
<![CDATA[ 
	内容：<br/>curl -XGET http://baidu.com<br/><br/>GET / HTTP/1.1<br/>User-Agent: curl/7.29.0<br/>Host: baidu.com<br/>Accept: */*<br/><br/>HTTP/1.1 200 OK<br/>Date: Fri, 31 Mar 2017 03:56:42 GMT<br/>Server: Apache<br/>Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT<br/>ETag: &quot;51-47cf7e6ee8400&quot;<br/>Accept-Ranges: bytes<br/>Content-Length: 81<br/>Cache-Control: max-age=86400<br/>Expires: Sat, 01 Apr 2017 03:56:42 GMT<br/>Connection: Keep-Alive<br/>Content-Type: text/html<br/><br/>&lt;html&gt;<br/>&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=http://www.baidu.com/&quot;&gt;<br/>&lt;/html&gt;<br/><br/><br/><br/>curl -XPOST http://baidu.com<br/><br/><br/>POST / HTTP/1.1<br/>User-Agent: curl/7.29.0<br/>Host: baidu.com<br/>Accept: */*<br/><br/>HTTP/1.1 200 OK<br/>Date: Fri, 31 Mar 2017 03:59:50 GMT<br/>Server: Apache<br/>Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT<br/>ETag: &quot;51-47cf7e6ee8400&quot;<br/>Accept-Ranges: bytes<br/>Content-Length: 81<br/>Cache-Control: max-age=86400<br/>Expires: Sat, 01 Apr 2017 03:59:50 GMT<br/>Connection: Keep-Alive<br/>Content-Type: text/html<br/><br/>&lt;html&gt;<br/>&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=http://www.baidu.com/&quot;&gt;<br/>&lt;/html&gt;<br/><br/><br/><br/>Post加个参数：<br/>curl -XPOST http://baidu.com -d&quot;say=hello&quot;<br/><br/>POST / HTTP/1.1<br/>User-Agent: curl/7.29.0<br/>Host: baidu.com<br/>Accept: */*<br/>Content-Length: 9<br/>Content-Type: application/x-www-form-urlencoded<br/><br/>say=helloHTTP/1.1 200 OK<br/>Date: Fri, 31 Mar 2017 04:03:47 GMT<br/>Server: Apache<br/>Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT<br/>ETag: &quot;51-47cf7e6ee8400&quot;<br/>Accept-Ranges: bytes<br/>Content-Length: 81<br/>Cache-Control: max-age=86400<br/>Expires: Sat, 01 Apr 2017 04:03:47 GMT<br/>Connection: Keep-Alive<br/>Content-Type: text/html<br/><br/>&lt;html&gt;<br/>&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=http://www.baidu.com/&quot;&gt;<br/>&lt;/html&gt;<br/><br/><br/><br/>Get里加个参数：<br/>curl -XGET http://baidu.com?say=hello<br/><br/>GET /?say=hello HTTP/1.1<br/>User-Agent: curl/7.29.0<br/>Host: baidu.com<br/>Accept: */*<br/><br/>HTTP/1.1 200 OK<br/>Date: Fri, 31 Mar 2017 04:05:06 GMT<br/>Server: Apache<br/>Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT<br/>ETag: &quot;51-47cf7e6ee8400&quot;<br/>Accept-Ranges: bytes<br/>Content-Length: 81<br/>Cache-Control: max-age=86400<br/>Expires: Sat, 01 Apr 2017 04:05:06 GMT<br/>Connection: Keep-Alive<br/>Content-Type: text/html<br/><br/>&lt;html&gt;<br/>&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=http://www.baidu.com/&quot;&gt;<br/>&lt;/html&gt;<br/>
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/8998/</link>
<title><![CDATA[[转载]nginx模块（echo,set-misc,simpl-ngx_devel_kit）使用实战]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Wed, 12 Oct 2016 08:50:04 +0000</pubDate> 
<guid>http://jackxiang.com/post/8998/</guid> 
<description>
<![CDATA[ 
	DownLoad:https://github.com/openresty/set-misc-nginx-module/<br/>&nbsp;&nbsp;&nbsp;&nbsp;最近公司运营提出需求，需要使从公司网站上下载的资料文件显示为中文名称，研发部问道我们有没有好的实现方法，php应该有这样的功能，研发回复说，之前就是这样实现过，但太消耗内存，不做考虑了，才有现在下载资料文件，显示中文名称没有实现。想了想，记起前段时间看agentzh（章亦春）大牛关于nginx的大作以及他写的nginx的模块，似乎有实现此类功能的模块，找了一下果然有：http://wiki.nginx.org/HttpSetMiscModule#Installation<br/>利用其中 set_decode_base64 以及nginx 的 add_header 添加一个http头：Content-Disposition ，配合php代码实现。<br/>nginx 添加模块重新编译<br/>下载需要的模块：<br/>到 https://github.com/agentzh/ 下载模块<br/>agentzh-echo-nginx-module-v0.41-1-gb3ad5c1.tar.gz<br/>agentzh-set-misc-nginx-module-v0.22rc8-5-ge79e7f0.tar.gz<br/>simpl-ngx_devel_kit-v0.2.17-10-g4192ba6.tar.gz<br/>解压到对应目录<br/>安装：<br/>./configure&nbsp;&nbsp;--user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/usr/local/nginx_module/ngx_devel_kit --add-module=/usr/local/nginx_module/misc-nginx --add-module=/usr/local/nginx_module/echo-nginx <br/> <br/>make -j2 <br/> <br/>make install <br/>php 实现部分我也不是太懂，就不贴出来了。<br/>nginx 相关配置段<br/><a href="http://jackxiang.com/attachment.php?fid=460" target="_blank"><img src="http://jackxiang.com/attachment.php?fid=460" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>最终效果，上图<br/><a href="http://jackxiang.com/attachment.php?fid=461" target="_blank"><img src="http://jackxiang.com/attachment.php?fid=461" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>各位童鞋注意啦：该种方式在使用CDN的网站中也可以生效的。<br/>从该功能上线以来看，效果还不错，agentzh（章亦春）写的nginx模块那是杠杠的<br/>参考：http://wiki.nginx.org/HttpSetMiscModule#Installation<br/>来自：http://longzhiyi.blog.51cto.com/350171/964677
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/8610/</link>
<title><![CDATA[发现nginx配置gzip，压缩css，不压缩js，原来是不压缩临界值，大于1000K的才压缩导致没有被gzip压缩。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Sat, 02 Apr 2016 17:25:17 +0000</pubDate> 
<guid>http://jackxiang.com/post/8610/</guid> 
<description>
<![CDATA[ 
	背景：发现并没有压缩，查来查去是这个配置有问题写成1000k了，也就是下面这些列表都不符合条件，不给gzip压缩，gzip_min_length&nbsp;&nbsp; 1k; 不压缩临界值，大于1K的才压缩，一般不用改,被修改成1000k了，于是没有压缩，查了老半天content-type，都写了，呵呵。<br/>修改后，在这儿测试了一下，果然压缩了：<br/>http://pagespeed.webkaka.com/youhua/gzip/<br/><br/>网址 http://www.jackxiang.com/template/trielegant/styles.css 的检测结果：<br/>是否压缩&nbsp;&nbsp;是<br/>压缩类型&nbsp;&nbsp;gzip<br/>原文件大小&nbsp;&nbsp;8704 字节<br/>压缩后文件大小&nbsp;&nbsp;4275 字节<br/>压缩率&nbsp;&nbsp;50.88%<br/><br/>图片是否需要启用GZip压缩？<br/><br/>无意间看到有网友提及，图片不用GZip压缩的。图片尽量不要使用gzip,因为gif,png等图片本身就是被压缩过的，<br/>开启和关闭图片GZip压缩后，网页的总体积是不同的，令人惊讶的是开启图片GZip压缩后，网页总体积竟然变大了。而耗时也相应的增多了。<br/>===========================================<br/>1、Vim打开Nginx配置文件<br/><br/>vim /usr/local/nginx/conf/nginx.conf<br/><br/>2、找到如下一段，进行修改<br/><br/>gzip on;<br/>gzip_min_length 1k;<br/>gzip_buffers 4 16k;<br/>#gzip_http_version 1.0;<br/>gzip_comp_level 2;<br/>gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;<br/>gzip_vary off;<br/>gzip_disable &quot;MSIE [1-6]&#92;.&quot;;<br/><br/>3、解释一下<br/><br/>第1行：开启Gzip<br/><br/>第2行：不压缩临界值，大于1K的才压缩，一般不用改<br/><br/>第3行：buffer，就是，嗯，算了不解释了，不用改<br/><br/>第4行：用了反向代理的话，末端通信是HTTP/1.0，有需求的应该也不用看我这科普文了；有这句的话注释了就行了，默认是HTTP/1.1<br/><br/>第5行：压缩级别，1-10，数字越大压缩的越好，时间也越长，看心情随便改吧<br/><br/>第6行：进行压缩的文件类型，缺啥补啥就行了，JavaScript有两种写法，最好都写上吧，总有人抱怨js文件没有压缩，其实多写一种格式就行了<br/><br/>第7行：跟Squid等缓存服务有关，on的话会在Header里增加&quot;Vary: Accept-Encoding&quot;，我不需要这玩意，自己对照情况看着办吧<br/><br/>第8行：IE6对Gzip不怎么友好，不给它Gzip了<br/><br/>上面摘自：http://www.veryhuo.com/a/view/51706.html<br/><br/>http://www.webkaka.com/blog/archives/how-to-set-gzip-for-js-in-Nginx.html<br/>https://segmentfault.com/q/1010000000585128<br/><br/>查询是否被zip压缩:<br/>http://pagespeed.webkaka.com/youhua/gzip/<br/><br/>输入：<br/>http://www.jackxiang.com/images/js/common.js?jsver=2.1.1.3626.3<br/><br/><br/>=======================================<br/>启用Gzip&nbsp;&nbsp;可减少 54.2 KB 启用服务器Gzip，可以减少传输字节数。更多&nbsp;&nbsp;-3分<br/>未启用Gzip的资源有：<br/>http://www.jackxiang.com/template/trielegant/styles.css （大小： 8.5 KB 预计可减少 5.9 KB ）<br/>http://www.jackxiang.com/images/js/common.js?jsver=2.1.1.3626.3 （大小： 20.3 KB 预计可减少 14.8 KB ）<br/>http://www.jackxiang.com/lang/zh-cn/jslang.js?jsver=2.1.1.3626.3 （大小： 3.7 KB 预计可减少 2.1 KB ）<br/>http://www.jackxiang.com/images/js/ajax.js?jsver=2.1.1.3626.3 （大小： 7.4 KB 预计可减少 6.0 KB ）<br/>http://www.jackxiang.com/images/js/swfobject.js?jsver=2.1.1.3626.3 （大小： 6.4 KB 预计可减少 4.2 KB ）<br/>http://www.jackxiang.com/images/css/SyntaxHighlighter.css （大小： 3.6 KB 预计可减少 2.5 KB ）<br/>http://jackxiang.com/favicon.jpg （大小： 1.9 KB 预计可减少 793 B ）<br/>http://js.users.51.la/4950674.js （大小： 1.9 KB 预计可减少 1.1 KB ）<br/>http://www.jackxiang.com/images/hl/shCore.js （大小： 9.5 KB 预计可减少 5.7 KB ）<br/>http://www.jackxiang.com/images/hl/shBrushPhp.js （大小： 3.7 KB 预计可减少 2.1 KB ）<br/>http://www.jackxiang.com/images/hl/shBrushJScript.js （大小： 937 B 预计可减少 437 B ）<br/>http://www.jackxiang.com/images/hl/shBrushJava.js （大小： 1.0 KB 预计可减少 494 B ）<br/>http://www.jackxiang.com/images/hl/shBrushSql.js （大小： 1.9 KB 预计可减少 964 B ）<br/>http://www.jackxiang.com/images/hl/shBrushCss.js （大小： 4.0 KB 预计可减少 2.2 KB ）<br/>http://www.jackxiang.com/images/hl/shBrushCpp.js （大小： 2.7 KB 预计可减少 1.4 KB ）<br/>http://www.jackxiang.com/images/hl/shBrushPython.js （大小： 4.7 KB 预计可减少 2.5 KB ）<br/>http://www.jackxiang.com/template/trielegant/images/logo_header.png （大小： 5.6 KB 预计可减少 237 B ）<br/>http://www.jackxiang.com/template/trielegant/images/long.gif （大小： 924 B 预计可减少 358 B ）<br/>http://jackxiang.com/template/trielegant/images/bridge-banner-eleven.jpg （大小： 18.9 KB 预计可减少 354 B ）<br/>http://icon.51.la/icon_0.gif （大小： 846 B 预计可减少 101 B ）<br/>http://eiv.baidu.com/hmt/icon/21.gif （大小： 1.1 KB 预计可减少 69 B ）
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/8486/</link>
<title><![CDATA[nginx支持redis，实现替换nginx+memcache方式]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Thu, 04 Feb 2016 09:18:39 +0000</pubDate> 
<guid>http://jackxiang.com/post/8486/</guid> 
<description>
<![CDATA[ 
	背景：Nginx直接连接redis，不用php的扩展连接，一定程序上提高了redis性能，但是在程序逻辑的可控制上会弱一点，用来做一些单纯的高并发登录没有问题，逻辑重点这种玩法并不能带来很大的提升。<br/>需要下载第三方模块ngx_http_redis-0.3.2.tar.gz，并需要重新编译nginx。<br/>注意要注释掉ngx_http_redis_module.c文件的145行<br/>/*static ngx_str_t&nbsp;&nbsp;ngx_http_redis_db&nbsp;&nbsp;= ngx_string(&quot;redis_db&quot;);*/<br/>否则会报错，意思是这个定义的redis_db在程序里没有使用，算是个警告报错，注释掉安装即可<br/><br/>./configure --user=nginx --group=nginx&nbsp;&nbsp;--prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/software/module/ngx_http_redis-0.3.2<br/><br/><br/>配置<br/>location / &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;set $redis_key $uri;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;redis_pass&nbsp;&nbsp;&nbsp;&nbsp; name:6379;<br/>&nbsp;&nbsp;&nbsp;&nbsp;default_type&nbsp;&nbsp; text/html;<br/>&nbsp;&nbsp;&nbsp;&nbsp;error_page&nbsp;&nbsp;&nbsp;&nbsp; 404 = /fallback;<br/>&nbsp;&nbsp;&#125;<br/><br/>$redis_db<br/>The number of redis database (required for &lt; 0.3.2).<br/>For ngx_http_redis &gt;= 0.3.2 is not obligatory, default value is &quot;0&quot; if not defined.<br/>这个$redis_db可以不配，默认是0database。<br/>更多官方的资料请参考：http://wiki.nginx.org/HttpRedis2Module<br/><br/>更多参考之Keepalived+nginx+redis主从+tomcat一机多实例实现会话共享：<br/>http://lovelace.blog.51cto.com/1028430/1550198<br/>https://www.nginx.com/resources/wiki/modules/redis2/<br/>
]]>
</description>
</item>
</channel>
</rss>