码迷,mamicode.com
首页 > 数据库 > 详细

NGINX-html静态页面Access Denied

时间:2018-02-10 20:47:55      阅读:596      评论:0      收藏:0      [点我收藏+]

标签:ext   /usr   error   tde   access   log   stc   blog   htm   

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

NGINX-html静态页面Access Denied

标签:ext   /usr   error   tde   access   log   stc   blog   htm   

原文地址:https://www.cnblogs.com/liang-yao/p/8439604.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!