之前看网上说关于 cgi.fig_pathinfo=1 时的配置漏洞:http://www.laruence.com/2010/05/20/1495.html
试了下后发现该漏洞在目前高版本的 php 中已经不再出现了,会直接显示 Access denied
,查看 nginx 错误日志如下:
Access to the script '/home/ksun/test' has been denied (see security.limit_extensions)
这是因为在 php 配置文件 www.conf 中的 security.limit_extensions 参数,该参数默认值为 .php
,也就是说只允许访问 .php 后缀的文件。