noel0217 发表于 2018-11-14 12:00:39

nginx经典搜集(分享)

呵呵,这是本人在使用nginx过程中搜集的一些博文,整理如下
  1。nginx的upstream目前支持5种方式的分配
  http://lihuipeng007.blog.163.com/blog/static/12108438820108206101535/
  2.nginx根据http请求头中的accept-language转发到不同的页面
  http://a-jie1981.iteye.com/blog/2017427
  3.nginx location匹配规则
  http://www.nginx.cn/115.html
  4.Nginx反向代理关于端口的问题
  http://www.cnblogs.com/likehua/p/4056625.html
  5.使用nginx sticky实现基于cookie的负载均衡 (想必大家最爱这个了)
  http://www.ttlsa.com/nginx/nginx-modules-nginx-sticky-module/
  安装时遇到的问题解决办法
  http://www.blogjava.net/sliverfancy/archive/2014/03/28/411594.html
  6.淘宝修改版nginx,tengine,集成了大量的插件,还有中文文档,不错的选择哦,打算以后用他了。
  http://tengine.taobao.org/
  7.502 网关超时解决方案
  http://jingyan.baidu.com/article/6fb756ecbf4774241858fb9a.html
  8.nginx缓存问题
  http://www.aichengxu.com/view/24099
  {
  1. 错误日志:warn:an upstream response is buffered to a temporary file
  因为我们下载文件比较多,默认会在nginx里缓存一下,所以关闭内容临时缓存:
  proxy_max_temp_file_size 0;
  2. 错误日志:warn:upstream sent more data than specified in "Content-Length" header while reading upstream
  关闭反向代理的内容缓冲:
  proxy_buffering off;
  3. 连接超时:upstream timed out (110: Connection timed out) while reading response header from upstream
  因为上传下载文件比较大,用时较长:
  nginx:
  proxy_connect_timeout 172800;
  proxy_send_timeout 172800;
  proxy_read_timeout 60;
  php.ini:
  max_execution_time = 172800
  max_input_time = 172800
  4.错误日志:warn:a client request body is buffered to a temporary file
  上传的内容比较大,缓存放不下,所以放到临时文件了。
  但是我们是文件服务器,上传文件多,没有办法,不过对小文件还是缓存一下:
  client_max_body_size 2050m;
  client_body_buffer_size 1024k;
  }

页: [1]
查看完整版本: nginx经典搜集(分享)