Home  >  Article  >  php教程  >  nginx+php-fpm组合解决PATHINFO最佳配置

nginx+php-fpm组合解决PATHINFO最佳配置

WBOY
WBOYOriginal
2016-06-06 20:12:141093browse

之前的工作中有遇到过nginx+php的环境新做的网站无法访问,各种出错的情况,往往是单一入口并且用了一些框架的架构。早期的nginx不支持pathinfo,只能通过正则之类的操作,辅以php.ini中cgi.fix_pathinfo,。后来又了解到了这样做可能会产生漏洞,如这篇文章

之前的工作中有遇到过nginx+php的环境新做的网站无法访问,各种出错的情况,往往是单一入口并且用了一些框架的架构。早期的nginx不支持pathinfo,只能通过正则之类的操作,辅以php.ini中cgi.fix_pathinfo,。后来又了解到了这样做可能会产生漏洞,如这篇文章描述的Nginx + PHP CGI的一个可能的安全漏洞。现在较新版本的nginx已经处理好这个问题了,只要适当配置,不会有什么问题。

[...]

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn