wordpress - ERR_INCOMPLETE_CHUNKED_ENCODING 与 LEMP 和 WSL
问题描述
我在 WSL Debian 上建立了一个 WordPress 站点。我无需登录即可访问 localhost 站点,但登录后无法访问管理页面。当我尝试访问管理页面时,浏览器的控制台会显示此错误 ERR_INCOMPLETE_CHUNKED_ENCODING。这是我的 wordpress.conf 文件:
server {
listen 80;
listen [::]:80;
root /var/www/html/wordpress;
index index.php index.html index.htm;
server_name mysite.com www.mysite.com;
error_log /var/log/nginx/mysite.com_error.log;
access_log /var/log/nginx/mysite.com_access.log;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_buffering off;
include snippets/fastcgi-php.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
这是 nginx.conf 文件
user www-data;
worker_processes auto;
pid /run/nginx.pid;
master_process off;
#include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
include /etc/nginx/sites-enabled/*;
}
我参考了这个 GitHub 页面https://github.com/microsoft/WSL/issues/2100并对 conf 文件进行了更改(在 HTTP 块中添加了 fastcgi_buffering),但我仍然收到错误消息。如何解决这个问题?
解决方案
推荐阅读
- django - 更改数据库后重新启动 Django 服务器
- c# - 如何实现 Android ISO 并将其加载到 C# WinForm 应用程序中?
- marklogic - 路径范围索引方面搜索在 Marklogic 9 中不起作用
- java - Mockito 让 mock 从现有的 mock 继承存根
- reactjs - 如果父组件卸载,防止子道具更新
- highcharts - 停止 HighCharts 在悬停一个系列时更改另一个系列的透明度
- python - 尝试从 github Enterprise 克隆时连接被拒绝
- symfony - 按字段对学说的@OneToMany ArrayCollection 进行排序
- javascript - 如何将 rabbitMQ 连接分配给类的属性以在另一个函数中使用它?
- javascript - 从 JSON 数组中检索与键相关的特定值