nginx中$host与$http_host、$server_name取值与含

概述: 很多时候,我们都需要用到nginx的全局变量,来进行判断或者功能使用实现,对于 $http_host 、$host 具体有什么区别,本文我们来看看对应的取值和含义吧! 为了能方便测试和看到...
概述: 很多时候,我们都需要用到nginx的全局变量,来进行判断或者功能使用实现,对于 $http_host 、$host 具体有什么区别,本文我们来看看对应的取值和含义吧! 为了能方便测试和看到...
有时候作为nginx web服务进行上传文件的时候会遇到client intended to send too large body的错误,我们该如何处理? 网上很多文章说明并不清晰,这边总结给需要的朋友,避免踩坑。 报错其ng...
概述: The ngx_stream_core_module module is available since version 1.9.0. This module is not built by default, it should be enabled with the --with-stream configuration parameter. 来自官方的说明,nginx从1.9.0开始支持了tcp模...
概述:headers-more-nginx-module模块可以帮助nginx自定义请求响应的头,在很多情况下隐藏和修改头,能在一定程度上避免安全攻击等问题,目前阿里云的负载均衡就有类似的功能,下面我们...
案例一、 server { ...... ...... ...... location ~ .*.(jpg|png)$ { root /opt/nginxtest; expires 1d; #deny all; } } 说明: 1、以上location匹配了所有jpg与png文件,如果该location中没有指定root,将继承server段中的...
概述: 使用过nginx的伙伴应该都知道,nginx本身默认是不支持或(or)和与(and)运算的,也就是 或者 | 等这样的方式都不能直接使用, 但不支持并不代表不能实现,本文中就来介绍在nginx下...