我需要配置 nginx 服务器,如果 URL 在 URL 中的任何位置包含两点(..),他就会显示 403 页。例如,如果 URL 是“site.sit/index.php?log=../conf.php - web-server 应该检测到尝试去上面的目录并引入 403-messege。我尝试在 conf 中配置这个想法-file nginx 那里:
location \.\. {
deny all;
}
Run Code Online (Sandbox Code Playgroud)
但这行不通。
告诉我,我如何实施这个计划?
nginx ×1