Nginx安装ngx_lua_waf改版
<p><a href="https://github.com/whsir/ngx_lua_waf">ngx_lua_waf改版</a>,增加网段、UA、主机白名单等功能,修复了一些bug,项目地址:<a href="https://github.com/whsir/ngx_lua_waf">...
51工具盒子
<p><a href="https://github.com/whsir/ngx_lua_waf">ngx_lua_waf改版</a>,增加网段、UA、主机白名单等功能,修复了一些bug,项目地址:<a href="https://github.com/whsir/ngx_lua_waf">...
<p><strong>文章目录</strong></p> <h3>location几种匹配模式 {#title-0}</h3> <p>location = /uri 精确匹配,不能使用正则且区分字符大小写</p> <p>location ^~ /uri 前缀匹配,不能使用...
<p>环境介绍:当前系统Centos7.5,nginx版本1.14.0,ngx_cache_purge(清理nginx缓存的一个插件)模块版本2.3,当前IP192.168.50.101</p> <p>1、下载解压ngx_cache_purge模块<br /> cd /usr/local/src wget https://gith...
<p>利用nginx的rewrite命令,可以实现URL的重写,可在nginx配置文件的server、location、if部分使用,对于rewrite有四种不同的flag。</p> <p>redirect:返回302临时重定向,浏览器地址栏会显示跳转后的URL地址,爬虫不会更新URL<br /> permanent:返回301永...
这里以2个域名为例,原使用域名www.demo.com,新域名为blog.whsir.com,要想所有www.demo.com中的内容转到blog.whsir.com,只是替换域名,其他内容不做改变。 当用户访问www.demo.com/a/b/1.html时,自动转到blog.whsir.com/a/b/1.html 方法一: server { server_name...
<p>在编译nginx时,默认会以debug模式来运行,取消debug的好处是编译后的nginx更加小巧,编译更快。</p> <p>1、下载nginx源码包<br /> wget http://nginx.org/download/nginx-1.14.0.tar.gz</p> <p>|---|------...
<p>TCMalloc(Thread-Caching Malloc)是google开发的开源工具gperftools中的一个成员,tcmalloc比glibc中的malloc内存分配效率要快,tcmalloc特别对多线程做了优化,很大程度提高了服务器在高并发下的性能,从而降低了系统的负载。</p> <p>tcmalloc属于gperftool...
<p>在编译时修改nginx源码,修改相应的版本信息,来达到欺骗黑客攻击的目的。</p> <p>1、下载nginx源码包<br /> wget http://nginx.org/download/nginx-1.14.0.tar.gz tar zxf nginx-1.14.0.tar.gz</p> <p>|...
之前介绍过如何通过源码定制nginx版本号信息(https://blog.whsir.com/post-3135.html),那么如果已经编译的nginx怎么办呢? 这里我们可以通过一个参数即可隐藏nginx版本信息 1、查看当前版本 curl -I 127.0.0.1 |---|-------------------| | 1 | curl -I 127.0.0...
<p>只允许百度谷歌等搜索引擎蜘蛛访问,正常用户无法访问,ua头根据自身情况进行增加删减</p> <p>在nginx的server字段中配置下面内容即可<br /> set $ua ''; if ($http_user_agent ~* (Baiduspider|googlebot|bing|sogou|yahoo...