访问出现部分.js.css等部分文件被拒绝错误日志如下:

19:20:13 [error] 1181#0: *287 FastCGI sent in stderr: "Access to the script '/usr/share/php/what/index.php' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 115.238.51.194, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "zheshisha.net"

经检查,php-fpm服务器的配置文件拒绝,修改文件(/etc/php-fpm.d/www.conf)配置选项如下:

security.limit_extensions=.php .php3 .php4 .php5 .html .js .css .jpg .jpeg .gif .png .htm

重启php-fpm服务

访问测试有问题,那么需要nginx.conf也需要对应做修改,如下:

location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css|json|eot|svg|ttf|woff|apk)$
{
root /usr/share/php/what;
expires 7d;
}

nginx报错日志:see security.limit_extensions的更多相关文章

  1. nginx报错:403 Forbidden 并且访问首页index.php是下载文件的状态

    nginx报错:403 Forbidden 并且访问首页index.php是下载文件的状态,不能正常解析php 系统有其他两个站访问是正常的 看日志没有看到明显的错误 搜索了下: 答案如下: php的 ...

  2. linux系统报错日志学习

    linux本身会自动记录系统报错日志:/var/log/messages 这个日志记录,我是在什么时候发现其强大的作用的呢?它有点像我们使用php脚本开发接口的时候技术员在重要地方打日志的效果,方便技 ...

  3. [小菜随笔]关于monkey报错日志分析

    今天小菜在一个测试群内看到群友发出一个monkey的报错信息,其实是一个很简单的报错 个人觉得monkey虽然操作起来比较简易,但其实查看日志分析日志也是很重要的环节,如果对错误分析不够详细,就容易误 ...

  4. nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】

    转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...

  5. nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的

    源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...

  6. nginx报错zero size shared memory zone one

    为了限速,在虚拟主机中加上了一个参数:limit_conn one 1:结果导致重启nginx报错: zero size shared memory zone "one"解决办法是 ...

  7. Centos下yum安装Nginx报错 No package nginx available.

    在Centos6下使用yum安装Nginx报错 解决方案: yum install epel-release

  8. 安装Nginx报错“Cannot retrieve metalink for repository: epel. Please verify its path and try again”

    CentOS 6.5中通过yum安装nginx报错. 搜了一下,很多都是修改某个配置文件的.但是在StackOverFlow的某个问题下,有人回答说修改配置文件并不是一个好的方法,虽然我采用了这个人的 ...

  9. nginx报错:nginx: [emerg] unknown directive in /etc/nginx/conf.d/test.conf:4

    nginx报错:nginx: [emerg] unknown directive  in /etc/nginx/conf.d/test.conf:4 解决: 第四行出现了 tab 空格 , 换成正常的 ...

随机推荐

  1. vs添加浏览器

    点击桌面谷歌图标,查看属性,赋值全部地址 在vs中,直接添加,把地址复制进去就ok了

  2. 【Oracle】审计

    1.审计的功能:监控用户在database 的 action (操作) 2.审计分类: 1) session :在同一个session,相同的语句只产生一个审计结果(默认) 2) access : 在 ...

  3. FBX骨骼坐标系与模型坐标系的关系

    采用assimp加载FBX文件.首先记录下ubuntu下assimp的编译安装. cd assimp_unzip_dir mkdir build cd build && cmake . ...

  4. swift的计算属性和懒加载

    计算属性每次都重新计算. 懒加载只计算一次. 可以借助backing store将计算属性转化为懒加载属性. 计算属性实质上退化为函数调用. 计算属性的标示是get.set.

  5. oc懒加载 & swift lazy

    oc的懒加载依赖于属性的双重属性的函数属性部分. 懒加载的本质是执行get函数. swift的lazy,理论上与此类似. 编译器优化时可能对初始化块进行了保存. 懒加载的本质是延迟执行. 只要是执行, ...

  6. AssemblyInfo.cs 文件信息

    using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices ...

  7. Python 数据清洗--处理Nan

    参考:http://blog.sina.com.cn/s/blog_13050351e0102xfis.html https://www.sogou.com/link?url=DOb0bgH2eKh1 ...

  8. Kattis - iBoard

    iBoard After years of success with a single-button mouse, a well known computer company has decided ...

  9. 转载:rem的用法

    本文属于转载,为尊重原作者的劳动成果,在此标注原文地址,点击此处浏览. 1.rem(font size of the root element)是指相对于根元素的字体大小的单位,em(font siz ...

  10. tensorflow常见函数

    1.类型转换 tf.string_to_number(string_tensor,out_type=None,name=None)  #字符串转为数字 tf.to_double(x,name='ToD ...