location ~ .*\.(gif|jpg|jpeg|png|bmp|wma|mp3|swf)$ { valid_referers none blocked server_names *.163.com 163.com baidu.com; if ($invalid_referer) {return 403;} expires 30d; }