網(wǎng)站部分目錄不允許通過瀏覽器訪問,設(shè)置為隱私目錄,例如cache和diy目錄,安全起見都要設(shè)置隱私錄。
1、NGINX服務(wù)器設(shè)置方法:(conf配置文件中)
location ^~ /cache/ { deny all; }
2、APACHE服務(wù)器設(shè)置方法:
新建.htaccess文件放到指定目錄下即可
<IfModule authz_core_module> Require all denied </IfModule> <IfModule !authz_core_module> Deny from all </IfModule>
文檔最后更新時(shí)間:2018-04-30 23:31:41