"Access to the script '/data/www/jiemo/index.html' has been denied (see security.limit_extensions)
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 访问index.html 在里面写了php代码,执行后显示 Access Denied 然后报错日志显示: FastCGI sent in stderr: "Access to the script '/data/www/jiemo/index.html' has been denied (see security.limit_extensions)" while reading response header from upstream 处理办法是在php-fpm.conf中的配置文件里,找到security.limit_extensions,添加一个. html security.limit_extensions = .html .php .php3 .php4 .php5 这个指令的作用是:限制主脚本FPM允许解析的扩展。这可以防止web服务器端的配置错误。您应该仅将FPM限制为.php扩展,以防止恶意用户使用exectute php代码的其他扩展。 所以要解析 .html执行php,需要在这块添加。 来源: oschina 链接: https://my.oschina.net/jiemowudi/blog/3141911