root /var/www/;
valid_referers none blocked server_names *.aaa.com http://localhost baidu.com;
if ($invalid_referer) {
rewrite ^/ ;
#return 403;
}
}
valid_referers none blocked server_names *.aaa.com aaa.com http://localhost baidu.com;
if ($invalid_referer) {
rewrite ^/ ;
# return 403;
}
}
valid_referers none blocked server_names *.aaa.com aaa.com http://localhost ; #涉及到的连接
if ($invalid_referer) {
rewrite ^/ ; #这条很重要哦..
}
access_log off; #日志功能关闭
root /var/www; #根目录
expires 2d; #时间周期
break;
}