小编Mis*_*lav的帖子

Nginx 发出 413 请求实体太大

我有一个 Django 应用程序,提供由在 Docker 容器中运行的 Nginx 提供支持的 React 静态文件。当我尝试通过我的网络应用程序上传一些较大的文件时,我不断413 Request entity too large直接从 Nginx接收

在此输入图像描述

这是我的 Nginx 配置



/ # nginx -T
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# configuration file /etc/nginx/nginx.conf:

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile …
Run Code Online (Sandbox Code Playgroud)

django nginx docker reactjs http-status-code-413

11
推荐指数
1
解决办法
1万
查看次数

标签 统计

django ×1

docker ×1

http-status-code-413 ×1

nginx ×1

reactjs ×1