dreams7433

Time:2020-1-3

1、 NGX ﹣ http ﹣ referer ﹣ module (block domain name requests from illegal sources), which is configured as follows:

location ~.*\. (gif|jpg|png|flv|swf|rar|zip)$
{
    valid_referers none blocked test.com *.test.com;
    if($valid_referer)
    {
        #return 403;
        rewrite ^/ http://www.test.com/403.jpg;
     }
}

2、 Httpaccesskeymoudule is configured as follows:

Parameter Description:

AccessKey on| off module switch

Access key_hashmethod md5| SHA-1 signature encryption method

AccessKey? Arg parameter name

Access key? Signature encryption rules

location ~.*\. (gif|jpg|png|flv|swf|rar|zip)$
{
    accesskey on;
    accesskey_hashmethod ;
    accesskey_arg "key";
    accesskey_signature "mypass$remote_addr";
}