wordpress错误ERR_INCOMPLETE_CHUNKED_ENCODING解决方法

        在阿里云上,搭建了个nginx服务器,今天wordpress访问不正常,css没有加载成功,后台媒体库也加载不了。Chrome控制台看到如下错误:ERR_INCOMPLETE_CHUNKED_ENCODING。


看了下nginx/logs/error.log下日志:

open() "/aliyun/server/nginx/fastcgi_temp/1/02/0000000021" failed (13: Permission denied) while reading upstream, client: x.x.x.x, server: x.x.x.x, request: "GET /blog/wp-admin/load-styles.php?c=1&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check&ver=4.1.1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xx.xx.xx.xx", referrer: "http://x.x.x.x/blog/wp-admin/"

        搜索了下,找到这篇文章http://www.tuicool.com/articles/7Bjiyq跟我遇到的问题类似。

发现nginx目录下fastcgi_temp属于nobody用户和用户组。

drwx------ 12 nobody  nobody    4096 Mar 14 18:24 fastcgi_temp


再看php-fpm配置文件:

#vi /etc/php-fpm.d/www.conf

; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
; RPM: apache Choosed to be able to access some dir as httpd
;user = nobody
user=www
; RPM: Keep a group allowed to write in log dir.
;group = nobody
group=www

用户和用户组已经改成了www。将fastcgi_temp及子目录改为www。如下:

#chown -R www:www fastcgi_temp

#ls -al
drwx------ 12 www  www    4096 Mar 14 18:24 fastcgi_temp


再次访问wordpress,一切正常!


参考:http://www.tuicool.com/articles/7Bjiyq


  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值