NGINX-html静态页面Access Denied,包括.js 和.png都无法显示
more /var/log/nginx/error.log
"fastcgi://127.0.0.1:9000", host: "47.93.55.148", referrer: "http://47.93.55.148/"
2017/07/18 09:23:34 [error] 2756#0: *2 FastCGI sent in stderr: "Access to the script ‘/usr/share/nginx/html/ip‘ has been denied (see security.limit_extensions)"
查看日志,发现,发现有这么一段
whereis php-fpm 查找配置文件
php-fpm: /usr/sbin/php-fpm /etc/php-fpm.conf /etc/php-fpm.d /usr/share/man/man8/php-fpm.8.gz
vim /etc/php-fpm.d/www.conf
190 security.limit_extensions = .html .htm .php .js .css .jpg .jpeg .gif .png
默认只允许执行扩展名为.php
systemctl restart php-fpm