请求接口时报错nginx 413 Request Entity Too Large

1.在rancher容器中执行命令行
$ cd /etc/nginx
$ cat nginx.conf
2.vi或vim修改配置文件
bash: vim: command not found

更新软件包列表

$ sudo apt-get update

更新软件包

$ sudo apt-get upgrade

安装vim

$ sudo apt-get install vim

3.vim 修改conf配置文件

http新增 client_max_body_size 10M;

esc :wq后配置文件同级
$ nginx -t
测试命令正确后执行不中断服务重启nginx.conf配置文件
$ nginx -s reload

posted @ 2024-02-24 14:30  chillymint  阅读(81)  评论(0)    收藏  举报