nginx遇到盗链怎么解决的,Nginx的几种算法,反向代理,跨网访问
nginx遇到盗链怎么解决的:
模块:ngx_http_referer_module
Syntax: valid_referersnone|blocked|server_names|string...;
Default: —
Context:server,location
列子:
location~*\.(gif|jpg|png|bmp)${
valid_referersnoneblocked*.qfcloud.topserver_names~tianyun~\.google\.~\.baidu\.;
if($invalid_referer){
return 403;
#rewrite.*;
}
}
nginx算法:
轮询、ip_hash、weight、fair(第三方)、usr_hash(第三方)