一、ngx_http_referer_module(阻擋來源非法的域名請求),配置如下:
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; } }
二、HttpAccessKeyMoudule,配置如下:
引數說明:
accesskey on|off 模塊開關
accesskey_hashmethod md5|sha-1 簽名加密方式
accesskey_arg 引數名稱
accesskey_signature 加密規則
location ~.*\. (gif|jpg|png|flv|swf|rar|zip)$ { accesskey on; accesskey_hashmethod md5; accesskey_arg "key"; accesskey_signature "mypass$remote_addr"; }
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/160729.html
標籤:Linux
下一篇:BASH Shell 檔案管理
