-
Notifications
You must be signed in to change notification settings - Fork 420
7 uri_Mod
star edited this page Apr 24, 2018
·
4 revisions
uri_Mod uri规则过滤模块
(对应配置文件:conf_json/uri_Mod.json)
该模块是整个访问控制规则的 第7步 用于配置uri访问控制
[
{
"state": "on",
# 该条规则开关
"hostname": ["*",""],
# host匹配规则;第一个参数:匹配内容,第二个:匹配方式;(这里是匹配任意host)
"uri": ["\\.(css|js|flv|swf|woff|txt)$","jio"],
# uri匹配规则;正则匹配uri
"action": "allow"
# 执行动作:允许
},
{
"state": "on",
"hostname": [["127.0.0.1","passport.game.com"],"list"],
# host匹配规则;第一个参数:匹配内容。第二个:匹配方式;(这里是匹配table中的host名称,字符串等于匹配)
"uri": ["\\.(gif|jpg|png|jpeg|bmp|ico)$","jio"],
"action": "allow"
},
{
"state": "on",
"hostname": ["*",""],
"uri": ["\\.(svn|git|htaccess|bash_history)","jio"],
"action": "deny"
# 执行动作:拒绝
},
{
"state": "on",
"hostname": ["*",""],
"uri": ["\\.(bak|inc|old|mdb|sql|backup|java|class)$","jio"],
"action": "deny"
},
{
"state": "on",
"hostname": ["*",""],
"uri": ["(vhost|bbs|hostname|wwwroot|www|site|root|hytop|flashfxp).*.rar","jio"],
"action": "deny"
},
{
"state": "on",
"hostname": ["*",""],
"uri": ["(phpmyadmin|jmx-console|jmxinvokerservlet)","jio"],
"action": "deny"
},
{
"state": "on",
"hostname": ["*",""],
"uri": ["java\\.lang","jio"],
"action": "deny"
},
{
"state": "on",
"hostname": ["*",""],
"uri": [
"/(attachments|upimg|images|css|uploadfiles|html|uploads|templets|static|template|data|inc|forumdata|upload|includes|cache|avatar)/(\\w+).(php|jsp)",
"jio"
],
"action": "deny"
}
]
一般情况下,过滤完静态资源后,剩下的都是拒绝一下uri的访问如.svn等一些敏感目录或文件