nginx 静态文件防盗链 Veröffentlicht am 2016-12-01 #nginx 防盗链 12345678910# location ~* \.(gif|jpg|png|swf|flv|ico)$ #指定文件类型location /Uploads/ #指定文件夹{ valid_referers none blocked *.xxx.com; if ($invalid_referer) { rewrite ^/ http://www.xxx.com/forbidden.png; return 414; } expires -1; }