Clrs
Clrs

Nginx configuration prohibits access to php scripts in the path

Nginx configuration prohibits access to php scripts in the path

Nginx configuration prohibits access to php scripts in the path
Multiple path
Multiple suffixes

 #匹配多个上传目录
location ~ ^/(uploads|static|data|dist|docs|layer_mobile|layui|sldate|swagger)
{
        # 匹配文件最名包含两个.以上的文件
        location ~ "([.]{2,})$"
        {
                deny all;
        }
        # 配置php和php5后缀
        location ~ ".(php|php5)$"
        {
                deny all;
        }
}

Clrs

Nginx configuration prohibits access to php scripts in the path
Nginx configuration prohibits access to php scripts in the pathMultiple pathMultiple suffixes #匹配多个上传目录 location ~ ^/(uploads|static|data|dist|docs|layer_mobile|l…
扫描二维码继续阅读
2022-04-03