HTTP 错误 502.2 - Bad Gateway指定的 CGI 应用程序由于未返回完整的一组 HTTP 头而产生错误行为。它实际返回的头是“Security Alert! The PHP CGI cannot be accessed directly.< p>This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.
< p>For more information as to why this behaviour exists, see the http://php.net/security.cgi-bin">manual page for CGI security.< p>For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit < a href="http://php.net/install.windows">the manual page.”。
iis7 iis8.5 出现以上问题,直接做如下操作
核实 php.ini 中的这几项
cgi.force_redirect=0
fastcgi.impersonate=1
fastcgi.logging=0