nginx报错日志:see security.limit_extensions
访问出现部分.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的更多相关文章
- nginx报错:403 Forbidden 并且访问首页index.php是下载文件的状态
nginx报错:403 Forbidden 并且访问首页index.php是下载文件的状态,不能正常解析php 系统有其他两个站访问是正常的 看日志没有看到明显的错误 搜索了下: 答案如下: php的 ...
- linux系统报错日志学习
linux本身会自动记录系统报错日志:/var/log/messages 这个日志记录,我是在什么时候发现其强大的作用的呢?它有点像我们使用php脚本开发接口的时候技术员在重要地方打日志的效果,方便技 ...
- [小菜随笔]关于monkey报错日志分析
今天小菜在一个测试群内看到群友发出一个monkey的报错信息,其实是一个很简单的报错 个人觉得monkey虽然操作起来比较简易,但其实查看日志分析日志也是很重要的环节,如果对错误分析不够详细,就容易误 ...
- nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】
转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...
- nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的
源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...
- nginx报错zero size shared memory zone one
为了限速,在虚拟主机中加上了一个参数:limit_conn one 1:结果导致重启nginx报错: zero size shared memory zone "one"解决办法是 ...
- Centos下yum安装Nginx报错 No package nginx available.
在Centos6下使用yum安装Nginx报错 解决方案: yum install epel-release
- 安装Nginx报错“Cannot retrieve metalink for repository: epel. Please verify its path and try again”
CentOS 6.5中通过yum安装nginx报错. 搜了一下,很多都是修改某个配置文件的.但是在StackOverFlow的某个问题下,有人回答说修改配置文件并不是一个好的方法,虽然我采用了这个人的 ...
- 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 空格 , 换成正常的 ...
随机推荐
- css处理图片下方留白问题
引用图片的时候,图片和下方内容会有一点小空白,大概如下图紫色横条: 不是说有margin还是padding,是因为ing是行级元素,浏览器就会默认留白了,这时候处理方法很简单,给img加上样式disp ...
- 【Oracle】重置参数
单实例中: alter system reset parameter <scope=memory|spfile|both>: --memory|spfile|both,选其一 集群环境中: ...
- jdbc转账操作
public class cs{ public static void main(String[] args){ try{ Connection conn=JdbcUtils.getConnectio ...
- MongoDB 学习笔记(五):固定集合、GridFS文件系统与服务器端脚本
一.count.distinct与group 1.count函数:查询文档数,如下图: 2.distinct:去重,用法:db.runCommand({distinct:"集合名" ...
- 阿里云服务上面部署redis + 本地Redis客户端连接方法
本文结合自己在阿里云服务器上面搭建redis服务器,在本地redis的客户端Redis Desktop Manager连接成功的操作,将操作中的一些方法做了一些归纳和总结,希望可以帮到有需要的同学. ...
- 原生ajax的get和post方法封装
get 方法 function serialize (data) { if (!data) { return ''; } var paris = []; for (var key in data) { ...
- [luogu3261 JLOI2015] 城池攻占 (左偏树+标记)
传送门 Description 小铭铭最近获得了一副新的桌游,游戏中需要用 m 个骑士攻占 n 个城池.这 n 个城池用 1 到 n 的整数表示.除 1 号城池外,城池 i 会受到另一座城池 fi 的 ...
- EhCache缓存页面、局部页面和对象缓存
页面缓存:SimplePageCachingFilter web.xml <!-- 页面缓存配置,配合ehcache.xml中name为“SimplePageCachingFilter”(默认值 ...
- SpProcPool阅读笔记--1
公司产品用了一个开源的框架,最近出了点问题,细看了这个框架. SpProcPool: https://github.com/spsoft/spprocpool.git 我们的线程池用的是传递文件描述 ...
- Centos6下创建Centos6基础镜像
在centos6下可以使用官方仓库拉取一个指定系统类型跟tag的镜像到本地 [root@localhost ~]# docker pull centos:6.8 6.8: Pulling from c ...