将 Apache 命令转换为 nginx (FilesMatch)
Convert Apache command to nginx (FilesMatch)
如何通过浏览器阻止查看某些类型的文件来配置Nginx?
<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$">
Order Allow,Deny
Deny from all
</FilesMatch>
这是 NginX 版本:
location ~ \.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$ {
deny all;
}
如何通过浏览器阻止查看某些类型的文件来配置Nginx?
<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$">
Order Allow,Deny
Deny from all
</FilesMatch>
这是 NginX 版本:
location ~ \.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$ {
deny all;
}