在阿里雲上,搭建了個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: "123.57.1.14", referrer: "http://x.x.x.x/blog/wp-admin/"
發現nginx目錄下fastcgi_temp屬於nobody使用者和使用者群組。
drwx------ 12 nobody nobody 4096 Mar 14 18:24 fastcgi_temp
#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
#chown -R www:www fastcgi_temp #ls -al drwx------ 12 nobody nobody 4096 Mar 14 18:24 fastcgi_temp
參考:http://www.tuicool.com/articles/7Bjiyq
以上就介紹了wordpress錯誤ERR_INCOMPLETE_CHUNKED_ENCODING解決方法,包含了方面的內容,希望對PHP教程有興趣的朋友有所幫助。