我有一个 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)