nginx
coder_小刀
投身移动互联网的85后码农
展开
-
nginx配置gzip
1、Vim打开Nginx配置文件 vim /usr/local/nginx/conf/nginx.conf 2、找到如下一段,进行修改 gzip on; gzip_min_length 1k; gzip_buffers 4 16k; #gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain a转载 2016-03-30 18:58:33 · 856 阅读 · 0 评论 -
HTTP 411 Content-Length required
今天碰到图片上传的过程中出现nginx 411问题。 首先上网查了下,原因如下:在使用Nginx 1.3.9以下版本,都存在当用户POST一个带有文件的请求的时候,出现HTTP 411错误 我目前使用的nginx版本太低了。 [root@i nginx]# nginx -v nginx version: nginx/1.0.15 参考:http://my.oschina.net/je原创 2016-04-10 19:44:08 · 8256 阅读 · 0 评论 -
nginx忽略favicon.ico日志
说明: favicon.ico占用nginx error_log日志大量信息,把我们真正需要查看的日志给覆盖。因此这里,我们通过log_not_found off关闭它。 实现: //把以下配置放到 server {} 块,关闭favicon.ico不存在时记录日志 location = /favicon.ico { log_not_found off; access_log of转载 2016-04-10 23:50:35 · 4725 阅读 · 0 评论