Nginx配置详解 http://www.cnblogs.com/knowledgesea/p/5175711.html
Nginx配置详解
序言
Nginx是lgor Sysoev为俄罗斯访问量第二的rambler.ru站点设计开发的。从2004年发布至今,凭借开源的力量,已经接近成熟与完善。
Nginx功能丰富,可作为HTTP服务器,也可作为反向代理服务器,邮件服务器。支持FastCGI、SSL、Virtual Host、URL Rewrite、Gzip等功能。并且支持很多第三方的模块扩展。
Nginx的稳定性、功能集、示例配置文件和低系统资源的消耗让他后来居上,在全球活跃的网站中有12.18%的使用比率,大约为2220万个网站。
牛逼吹的差不多啦,如果你还不过瘾,你可以百度百科或者一些书上找到这样的夸耀,比比皆是。
Nginx常用功能
1、Http代理,反向代理:作为web服务器最常用的功能之一,尤其是反向代理。
这里我给来2张图,对正向代理与反响代理做个诠释,具体细节,大家可以翻阅下资料。
Nginx在做反向代理时,提供性能稳定,并且能够提供配置灵活的转发功能。Nginx可以根据不同的正则匹配,采取不同的转发策略,比如图片文件结尾的走文件服务器,动态页面走web服务器,只要你正则写的没问题,又有相对应的服务器解决方案,你就可以随心所欲的玩。并且Nginx对返回结果进行错误页跳转,异常判断等。如果被分发的服务器存在异常,他可以将请求重新转发给另外一台服务器,然后自动去除异常服务器。
2、负载均衡
Nginx提供的负载均衡策略有2种:内置策略和扩展策略。内置策略为轮询,加权轮询,Ip hash。扩展策略,就天马行空,只有你想不到的没有他做不到的啦,你可以参照所有的负载均衡算法,给他一一找出来做下实现。
上3个图,理解这三种负载均衡算法的实现
Ip hash算法,对客户端请求的ip进行hash操作,然后根据hash结果将同一个客户端ip的请求分发给同一台服务器进行处理,可以解决session不共享的问题。
3、web缓存
Nginx可以对不同的文件做不同的缓存处理,配置灵活,并且支持FastCGI_Cache,主要用于对FastCGI的动态程序进行缓存。配合着第三方的ngx_cache_purge,对制定的URL缓存内容可以的进行增删管理。
4、Nginx相关地址
源码:https://trac.nginx.org/nginx/browser
官网:http://www.nginx.org/
Nginx配置文件结构
如果你下载好啦,你的安装文件,不妨打开conf文件夹的nginx.conf文件,Nginx服务器的基础配置,默认的配置也存放在此。
在nginx.conf的注释符号位#
nginx文件的结构,这个对刚入门的同学,可以多看两眼。
默认的config
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#user nobody; worker_processes 1;error_log logs/error.log;
error_log logs/error.log notice;
error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}http {
include mime.types;
default_type application/octet-stream;#log_format main </span><span style="color: #800000;">'</span><span style="color: #800000;">$remote_addr - $remote_user [$time_local] "$request" </span><span style="color: #800000;">'</span><span style="color: #000000;"> # </span><span style="color: #800000;">'</span><span style="color: #800000;">$status $body_bytes_sent "$http_referer" </span><span style="color: #800000;">'</span><span style="color: #000000;"> # </span><span style="color: #800000;">'</span><span style="color: #800000;">"$http_user_agent" "$http_x_forwarded_for"</span><span style="color: #800000;">'</span><span style="color: #000000;">; #access_log logs</span>/<span style="color: #000000;">access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout </span><span style="color: #800080;">0</span><span style="color: #000000;">; keepalive_timeout </span><span style="color: #800080;">65</span><span style="color: #000000;">; #gzip on; server { listen </span><span style="color: #800080;">80</span><span style="color: #000000;">; server_name localhost; #charset koi8</span>-<span style="color: #000000;">r; #access_log logs</span>/<span style="color: #000000;">host.access.log main; location </span>/<span style="color: #000000;"> { root html; index index.html index.htm; } #error_page </span><span style="color: #800080;">404</span> /<span style="color: #800080;">404</span><span style="color: #000000;">.html; # redirect server error pages to the </span><span style="color: #0000ff;">static</span> page /<span style="color: #000000;">50x.html # error_page </span><span style="color: #800080;">500</span> <span style="color: #800080;">502</span> <span style="color: #800080;">503</span> <span style="color: #800080;">504</span> /<span style="color: #000000;">50x.html; location </span>= /<span style="color: #000000;">50x.html { root html; } # proxy the PHP scripts to Apache listening on </span><span style="color: #800080;">127.0</span>.<span style="color: #800080;">0.1</span>:<span style="color: #800080;">80</span><span style="color: #000000;"> # #location </span>~<span style="color: #000000;"> \.php$ { # proxy_pass http:</span><span style="color: #008000;">//</span><span style="color: #008000;">127.0.0.1;</span>
#}
# pass the PHP scripts to FastCGI server listening on </span><span style="color: #800080;">127.0</span>.<span style="color: #800080;">0.1</span>:<span style="color: #800080;">9000</span><span style="color: #000000;"> # #location </span>~<span style="color: #000000;"> \.php$ { # root html; # fastcgi_pass </span><span style="color: #800080;">127.0</span>.<span style="color: #800080;">0.1</span>:<span style="color: #800080;">9000</span><span style="color: #000000;">; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME </span>/<span style="color: #000000;">scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, </span><span style="color: #0000ff;">if</span> Apache<span style="color: #800000;">'</span><span style="color: #800000;">s document root</span> # concurs with nginx<span style="color: #800000;">'</span><span style="color: #800000;">s one</span>
#
#location ~ /.ht {
# deny all;
#}
}# another </span><span style="color: #0000ff;">virtual</span> host <span style="color: #0000ff;">using</span> mix of IP-, name-, and port-<span style="color: #000000;">based configuration # #server { # listen </span><span style="color: #800080;">8000</span><span style="color: #000000;">; # listen somename:</span><span style="color: #800080;">8080</span><span style="color: #000000;">; # server_name somename alias another.alias; # location </span>/<span style="color: #000000;"> { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen </span><span style="color: #800080;">443</span><span style="color: #000000;"> ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:</span>!aNULL:!<span style="color: #000000;">MD5; # ssl_prefer_server_ciphers on; # location </span>/<span style="color: #000000;"> { # root html; # index index.html index.htm; # } #}
}
nginx文件结构
... #全局块
events { #events块
...
}
http #http块
{
... #http全局块
server #server块
{
... #server全局块
location [PATTERN] #location块
{
...
}
location [PATTERN]
{
...
}
}
server
{
...
}
... #http全局块
}
1、全局块:配置影响nginx全局的指令。一般有运行nginx服务器的用户组,nginx进程pid存放路径,日志存放路径,配置文件引入,允许生成worker process数等。
2、events块:配置影响nginx服务器或与用户的网络连接。有每个进程的最大连接数,选取哪种事件驱动模型处理连接请求,是否允许同时接受多个网路连接,开启多个网络连接序列化等。
3、http块:可以嵌套多个server,配置代理,缓存,日志定义等绝大多数功能和第三方模块的配置。如文件引入,mime-type定义,日志自定义,是否使用sendfile传输文件,连接超时时间,单连接请求数等。
4、server块:配置虚拟主机的相关参数,一个http中可以有多个server。
5、location块:配置请求的路由,以及各种页面的处理情况。
下面给大家上一个配置文件,作为理解,同时也配入我搭建的一台测试机中,给大家示例。
########### 每个指令必须有分号结束。################# #user administrator administrators; #配置用户或者组,默认为nobody nobody。 #worker_processes 2; #允许生成的进程数,默认为1 #pid /nginx/pid/nginx.pid; #指定nginx进程运行文件存放地址 error_log log/error.log debug; #制定日志路径,级别。这个设置可以放入全局块,http块,server块,级别以此为:debug|info|notice|warn|error|crit|alert|emerg events { accept_mutex on; #设置网路连接序列化,防止惊群现象发生,默认为on multi_accept on; #设置一个进程是否同时接受多个网络连接,默认为off #use epoll; #事件驱动模型,select|poll|kqueue|epoll|resig|/dev/poll|eventport worker_connections 1024; #最大连接数,默认为512 } http { include mime.types; #文件扩展名与文件类型映射表 default_type application/octet-stream; #默认文件类型,默认为text/plain #access_log off; #取消服务日志 log_format myFormat '$remote_addr–$remote_user [$time_local] $request $status $body_bytes_sent $http_referer $http_user_agent $http_x_forwarded_for'; #自定义格式 access_log log/access.log myFormat; #combined为日志格式的默认值 sendfile on; #允许sendfile方式传输文件,默认为off,可以在http块,server块,location块。 sendfile_max_chunk 100k; #每个进程每次调用传输数量不能大于设定的值,默认为0,即不设上限。 keepalive_timeout 65; #连接超时时间,默认为75s,可以在http,server,location块。upstream mysvr { server </span><span style="color: #800080;">127.0</span>.<span style="color: #800080;">0.1</span>:<span style="color: #800080;">7878</span><span style="color: #000000;">; server </span><span style="color: #800080;">192.168</span>.<span style="color: #800080;">10.121</span>:<span style="color: #800080;">3333</span><span style="color: #000000;"> backup; #热备 } error_page </span><span style="color: #800080;">404</span> https:<span style="color: #008000;">//</span><span style="color: #008000;">www.baidu.com; #错误页</span>
server {
keepalive_requests 120; #单连接请求上限次数。
listen 4545; #监听端口
server_name 127.0.0.1; #监听地址
location ~^.+$ { #请求的url过滤,正则匹配,为区分大小写,为不区分大小写。
#root path; #根目录
#index vv.txt; #设置默认页
proxy_pass http://mysvr; #请求转向mysvr 定义的服务器列表
deny 127.0.0.1; #拒绝的ip
allow 172.18.5.54; #允许的ip
}
}
}
上面是nginx的基本配置,需要注意的有以下几点:
1、1.$remote_addr 与$http_x_forwarded_for 用以记录客户端的ip地址; 2.$remote_user :用来记录客户端用户名称; 3.$time_local : 用来记录访问时间与时区;4.$request : 用来记录请求的url与http协议;
5.$status : 用来记录请求状态;成功是200, 6.$body_bytes_s ent :记录发送给客户端文件主体内容大小;7.$http_referer :用来记录从那个页面链接访问过来的; 8.$http_user_agent :记录客户端浏览器的相关信息;
2、惊群现象:一个网路连接到来,多个睡眠的进程被同事叫醒,但只有一个进程能获得链接,这样会影响系统性能。
3、每个指令必须有分号结束。
总结
如果你在开发过程中使用啦这些技术,或者你要使用遇到啦什么问题,欢迎加入左上角的群,我们一起讨论学习,本篇未完待续。
</div>
<div class="postDesc">posted @ <span id="post-date">2016-02-02 12:39</span> <a href="http://www.cnblogs.com/knowledgesea/">张龙豪</a> 阅读(<span id="post_view_count">34640</span>) 评论(<span id="post_comment_count">19</span>) <a href="https://i.cnblogs.com/EditPosts.aspx?postid=5175711" rel="nofollow">编辑</a> <a href="#" onclick="AddToWz(5175711);return false;">收藏</a></div>
</div>
<script type="text/javascript">var allowComments=true,cb_blogId=114739,cb_entryId=5175711,cb_blogApp=currentBlogApp,cb_blogUserGuid='4544b533-3f85-e111-aa3f-842b2b196315',cb_entryCreatedDate='2016/2/2 12:39:00';loadViewCount(cb_entryId);</script>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122159909-169160674.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3358349" class="layer">#1楼</a><a name="3358349" id="comment_anchor_3358349"></a> <span class="comment_date">2016-02-02 13:49</span> <a id="a_comment_author_3358349" href="http://www.cnblogs.com/bluedoctor/" target="_blank">深蓝医生</a> <a href="http://msg.cnblogs.com/send/%E6%B7%B1%E8%93%9D%E5%8C%BB%E7%94%9F" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3358349" class="blog_comment_body">Mark,备用</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3358349,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3358349,'Bury',this)">反对(0)</a></div><span id="comment_3358349_avatar" style="display:none;">http://pic.cnblogs.com/face/u114517.png?id=23112533</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165118941-1891728306.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3358350" class="layer">#2楼</a><a name="3358350" id="comment_anchor_3358350"></a> <span class="comment_date">2016-02-02 13:49</span> <a id="a_comment_author_3358350" href="http://www.cnblogs.com/wrzszhaowei/" target="_blank">wrzs</a> <a href="http://msg.cnblogs.com/send/wrzs" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3358350" class="blog_comment_body">mark</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3358350,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3358350,'Bury',this)">反对(0)</a></div><span id="comment_3358350_avatar" style="display:none;">http://pic.cnblogs.com/face/u288268.jpg?id=28165326</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122213034-835700100.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3358382" class="layer">#3楼</a><a name="3358382" id="comment_anchor_3358382"></a> <span class="comment_date">2016-02-02 14:24</span> <a id="a_comment_author_3358382" href="http://www.cnblogs.com/kaituorensheng/" target="_blank">jihite</a> <a href="http://msg.cnblogs.com/send/jihite" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3358382" class="blog_comment_body">好文赞</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3358382,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3358382,'Bury',this)">反对(0)</a></div><span id="comment_3358382_avatar" style="display:none;">http://pic.cnblogs.com/face/u408927.jpg?id=16165421</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165059066-851406188.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3358545" class="layer">#4楼</a><a name="3358545" id="comment_anchor_3358545"></a> <span class="comment_date">2016-02-02 17:39</span> <a id="a_comment_author_3358545" href="http://www.cnblogs.com/windyfancy/" target="_blank">枫之物语</a> <a href="http://msg.cnblogs.com/send/%E6%9E%AB%E4%B9%8B%E7%89%A9%E8%AF%AD" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3358545" class="blog_comment_body">图不错,收藏</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3358545,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3358545,'Bury',this)">反对(0)</a></div><span id="comment_3358545_avatar" style="display:none;">http://pic.cnblogs.com/face/10625/20160128122750.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165054644-1513097047.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3358775" class="layer">#5楼</a><a name="3358775" id="comment_anchor_3358775"></a> <span class="comment_date">2016-02-03 09:49</span> <a id="a_comment_author_3358775" href="http://www.cnblogs.com/yinrq/" target="_blank">Joye.Net</a> <a href="http://msg.cnblogs.com/send/Joye.Net" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3358775" class="blog_comment_body">认真看了楼主的文章,受益匪浅。<br>特别是楼主的配图真实形象,看的出是楼主深刻理解后总结出来的精华。<br>感谢楼主这种乐于学习,乐于分享精神。<br>已推荐!</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3358775,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3358775,'Bury',this)">反对(0)</a></div><span id="comment_3358775_avatar" style="display:none;">http://pic.cnblogs.com/face/543714/20160414092934.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165059066-851406188.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3358834" class="layer">#6楼</a><a name="3358834" id="comment_anchor_3358834"></a> <span class="comment_date">2016-02-03 10:44</span> <a id="a_comment_author_3358834" href="http://home.cnblogs.com/u/125048/" target="_blank">ahanflw</a> <a href="http://msg.cnblogs.com/send/ahanflw" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3358834" class="blog_comment_body">不错</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3358834,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3358834,'Bury',this)">反对(0)</a></div>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122159909-169160674.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3359028" class="layer">#7楼</a><a name="3359028" id="comment_anchor_3359028"></a> <span class="comment_date">2016-02-03 15:16</span> <a id="a_comment_author_3359028" href="http://www.cnblogs.com/xiaotongs/" target="_blank">小同</a> <a href="http://msg.cnblogs.com/send/%E5%B0%8F%E5%90%8C" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3359028" class="blog_comment_body">很不错</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3359028,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3359028,'Bury',this)">反对(0)</a></div>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165105785-733256767.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3359342" class="layer">#8楼</a><a name="3359342" id="comment_anchor_3359342"></a> <span class="comment_date">2016-02-04 10:20</span> <a id="a_comment_author_3359342" href="http://home.cnblogs.com/u/788818/" target="_blank">笑天下</a> <a href="http://msg.cnblogs.com/send/%E7%AC%91%E5%A4%A9%E4%B8%8B" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3359342" class="blog_comment_body">mark</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3359342,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3359342,'Bury',this)">反对(0)</a></div>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165118941-1891728306.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3359358" class="layer">#9楼</a><a name="3359358" id="comment_anchor_3359358"></a> <span class="comment_date">2016-02-04 10:44</span> <a id="a_comment_author_3359358" href="http://www.cnblogs.com/iplay/" target="_blank">野生码字员</a> <a href="http://msg.cnblogs.com/send/%E9%87%8E%E7%94%9F%E7%A0%81%E5%AD%97%E5%91%98" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3359358" class="blog_comment_body">Mark</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3359358,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3359358,'Bury',this)">反对(0)</a></div><span id="comment_3359358_avatar" style="display:none;">http://pic.cnblogs.com/face/160272/20150628160723.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122145659-1386615574.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3363686" class="layer">#10楼</a><a name="3363686" id="comment_anchor_3363686"></a> <span class="comment_date">2016-02-19 13:54</span> <a id="a_comment_author_3363686" href="http://www.cnblogs.com/yunspider/" target="_blank">yunspider</a> <a href="http://msg.cnblogs.com/send/yunspider" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3363686" class="blog_comment_body">谢谢分享</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3363686,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3363686,'Bury',this)">反对(0)</a></div><span id="comment_3363686_avatar" style="display:none;">http://pic.cnblogs.com/face/646500/20140802151314.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122218409-10372106.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3364471" class="layer">#11楼</a><a name="3364471" id="comment_anchor_3364471"></a> <span class="comment_date">2016-02-21 16:49</span> <a id="a_comment_author_3364471" href="http://home.cnblogs.com/u/206330/" target="_blank">yongganhangxing</a> <a href="http://msg.cnblogs.com/send/yongganhangxing" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3364471" class="blog_comment_body">好资料,认真学习,谢谢分享!</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3364471,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3364471,'Bury',this)">反对(0)</a></div>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165102285-1803303706.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3370447" class="layer">#12楼</a><a name="3370447" id="comment_anchor_3370447"></a> <span class="comment_date">2016-03-02 17:22</span> <a id="a_comment_author_3370447" href="http://www.cnblogs.com/lzr-rr/" target="_blank">渊源、</a> <a href="http://msg.cnblogs.com/send/%E6%B8%8A%E6%BA%90%E3%80%81" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3370447" class="blog_comment_body">好资料,谢谢分享!</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3370447,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3370447,'Bury',this)">反对(0)</a></div><span id="comment_3370447_avatar" style="display:none;">http://pic.cnblogs.com/face/561354/20160119172715.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165047098-457362507.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3445165" class="layer">#13楼</a><a name="3445165" id="comment_anchor_3445165"></a> <span class="comment_date">2016-06-03 11:54</span> <a id="a_comment_author_3445165" href="http://www.cnblogs.com/bowen58/" target="_blank">_Bowen</a> <a href="http://msg.cnblogs.com/send/_Bowen" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3445165" class="blog_comment_body">不错,好文章,图文并茂,简单易懂。当Nginx服务器down机了怎么办</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3445165,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3445165,'Bury',this)">反对(0)</a></div><span id="comment_3445165_avatar" style="display:none;">http://pic.cnblogs.com/face/715459/20150716113116.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122229206-248787096.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3485258" class="layer">#14楼</a><a name="3485258" id="comment_anchor_3485258"></a> <span class="comment_date">2016-08-08 15:21</span> <a id="a_comment_author_3485258" href="http://www.cnblogs.com/music180/" target="_blank">music180</a> <a href="http://msg.cnblogs.com/send/music180" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3485258" class="blog_comment_body">666</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3485258,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3485258,'Bury',this)">反对(0)</a></div><span id="comment_3485258_avatar" style="display:none;">http://pic.cnblogs.com/face/796693/20150811101955.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122159909-169160674.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3517206" class="layer">#15楼</a><a name="3517206" id="comment_anchor_3517206"></a> <span class="comment_date">2016-09-22 17:12</span> <a id="a_comment_author_3517206" href="http://www.cnblogs.com/wzk1992/" target="_blank">qiuku_ya_zai_wazi_li</a> <a href="http://msg.cnblogs.com/send/qiuku_ya_zai_wazi_li" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3517206" class="blog_comment_body">楼组用心,向榜样学习</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3517206,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3517206,'Bury',this)">反对(0)</a></div><span id="comment_3517206_avatar" style="display:none;">http://pic.cnblogs.com/face/942835/20160423090358.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122130300-312499482.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3617555" class="layer">#16楼</a><a name="3617555" id="comment_anchor_3617555"></a> <span class="comment_date">2017-02-13 17:56</span> <a id="a_comment_author_3617555" href="http://www.cnblogs.com/muxiaoye/" target="_blank">牧小野</a> <a href="http://msg.cnblogs.com/send/%E7%89%A7%E5%B0%8F%E9%87%8E" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3617555" class="blog_comment_body">看图</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3617555,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3617555,'Bury',this)">反对(0)</a></div><span id="comment_3617555_avatar" style="display:none;">http://pic.cnblogs.com/face/697158/20150309135252.png</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201602/398358-20160218122229206-248787096.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3619109" class="layer">#17楼</a><a name="3619109" id="comment_anchor_3619109"></a> <span class="comment_date">2017-02-15 14:28</span> <a id="a_comment_author_3619109" href="http://www.cnblogs.com/hpp3501/" target="_blank">孤狼灬</a> <a href="http://msg.cnblogs.com/send/%E5%AD%A4%E7%8B%BC%E7%81%AC" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3619109" class="blog_comment_body">谢谢楼主</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3619109,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3619109,'Bury',this)">反对(0)</a></div><span id="comment_3619109_avatar" style="display:none;">http://pic.cnblogs.com/face/u455634.jpg?id=11160938</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165118941-1891728306.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3619110" class="layer">#18楼</a><a name="3619110" id="comment_anchor_3619110"></a> <span class="comment_date">2017-02-15 14:28</span> <a id="a_comment_author_3619110" href="http://www.cnblogs.com/hpp3501/" target="_blank">孤狼灬</a> <a href="http://msg.cnblogs.com/send/%E5%AD%A4%E7%8B%BC%E7%81%AC" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3619110" class="blog_comment_body">为什么我回复的没有美女图片呢</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3619110,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3619110,'Bury',this)">反对(0)</a></div><span id="comment_3619110_avatar" style="display:none;">http://pic.cnblogs.com/face/u455634.jpg?id=11160938</span>
</div>
</div>
<div class="feedbackItem" style="background: url("http://images2015.cnblogs.com/blog/398358/201603/398358-20160329165130738-1465897262.jpg") right center no-repeat;">
<div class="feedbackListSubtitle">
<div class="feedbackManage">
<span class="comment_actions"></span>
</div>
<a href="#3622094" class="layer">#19楼</a><a name="3622094" id="comment_anchor_3622094"></a><span id="comment-maxId" style="display:none;">3622094</span><span id="comment-maxDate" style="display:none;">2017/2/20 10:34:58</span> <span class="comment_date">2017-02-20 10:34</span> <a id="a_comment_author_3622094" href="http://www.cnblogs.com/cestblog/" target="_blank">misselven</a> <a href="http://msg.cnblogs.com/send/misselven" title="发送站内短消息" class="sendMsg2This"> </a>
</div>
<div class="feedbackCon">
<div id="comment_body_3622094" class="blog_comment_body">写的很是详细,日志部分的参数也写的非常到位<br>点赞</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3622094,'Digg',this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3622094,'Bury',this)">反对(0)</a></div><span id="comment_3622094_avatar" style="display:none;">http://pic.cnblogs.com/face/712247/20150807104908.png</span>
</div>
</div>
<div id="comments_pager_bottom"></div></div><script type="text/javascript">var commentManager = new blogCommentManager();commentManager.renderComments(0);</script>
</div>
【直播】支付宝、微博、阿里云专家联合解读红包浪潮下的核心技术架构
【推荐】融云即时通讯云-豆果美食、Faceu等亿级APP都在用
【活动】一元专享1500元微软智能云Azure
· 「代码家」的学习过程和学习经验分享
· 写给未来的程序媛
· 高质量的工程代码为什么难写
· 循序渐进地代码重构