nginx禁止垃圾蜘蛛爬取

#nginx禁止垃圾蜘蛛爬取 if ($http_user_agent ~* (AhrefsBot|BUbiNG|DotBot|ltx71|MJ12bot|SEMrushBot|Applebot|Daum|Exabot|SeznamBot|BLEXBot)) { return 403; }

- 阅读全文 -

nginx配置location

指令作用匹配指定的请求uri(请求uri不包含查询字符串,如http://localhost:8080/test?id=10,请求uri是/test)语法形式location   [ = | ~ | ~* | ^~ | @]   /uri/     { configuration }匹配模式及顺序匹配字符串分为两种:普通字符串(literal string)和正则表达式(regular expre

- 阅读全文 -

nginx 502的解决方法

错误信息 failed (104: Connection reset by peer) while reading response header from upstream解决办法:在Nginx配置文件的的http段,根据需要修改下面配置(宝塔面板在/www/server/nginx/conf/proxy.conf修改)proxy_buffer_size 128k; #代理服务器缓冲区大小,

- 阅读全文 -